dyerware
Support => Wordpress Plugins => Topic started by: bmlcreative on April 17, 2012, 03:23:16 PM
-
Hi,
Thanks for this great plugin - it works beautifully. The only thing I'm wondering if there is a way to reorder the key of group names on the x-axis.
Here is the shortcode that I am using:
[easychart type="horizbar" title="Customer course rating (over past 5 years)" height="300" width="350" chartfadecolor="FFFFFF"
groupnames="Excellent,Good,OK,Poor" valuenames="2012,2011,2010,2009,2008"
group1values="110, 135, 160, 140, 75"
group2values="33, 20, 42, 27, 30"
group3values="7, 11, 2, 6, 9"
group4values="1, 0, 2, 0, 0"
groupcolors="B91127,333333,666666,999999"]
Even though the groupname order above is 'Excellent > Good > OK > Poor', it is currently displaying in the x-axis as 'OK > Good > Poor > Excellent'.
It's only a minor point, but would be great if the order of the groupnames in the axis key could match the order on the chart.
Any help on achieving this would be greatly appreciated.
Cheers
Dave
-
Bump!
Sorry guys - really need some advice on this one if possible... even if it's just a point in the right direction to the coding that controls the sort order?
Cheers
-
Gotcha. Ill look at it. Sorry for the delay.
-
Ok I recall this now 8). The sort order is based on the longest value when using a horizontal graph. Try vertical.
Also a stacked graph tweaks the order from frontmost to rear (kind of the reverse of the horizontal)
-
Thanks for the reply - unfortunately, changing the chart to a vertbar doesn't effect the sort order of the key. The order of the key doesn't seem to be related to the longest value, because if it did, then the order would be as I need it to.
The only thing I can see that it might be, is by number of characters in the value title determines the order, so:
OK (= 1st because only 2 characters), Good (= 2nd because has 4 characters), Poor (Also 4 characters but 3rd due to alphabetical sorting?), Excellent (= 4th due to having 9 characters)....
This is only a guess but is the only pattern/logic I can see?
-
I'll post a replacement file here this evening for u
-
Im having the same problem. Have you guys found a solution for this. Amazing plugin by the way
-
Hah I forgot about this. I'm a bad admin :)
Ill look at it
-
Ok just a quick update: The table at the bottom is always showing the group titles as they appear in the shortcut.
-
Ok an update is in the app store. Horizontal bar graph label axis is now going to match your ordering in the shortcode (just as the values table does).
Sorry about the delay!