Order of series on a horizontal bar chart

1,192 views
Skip to first unread message

Kevin

unread,
Feb 7, 2011, 2:21:10 AM2/7/11
to jqplot-users
Hi guys,

How can i change the order of series on a horizontal bar chart ?

On a vertical bar chart, series display from left to right, but on a
horizontal bar chart, it displayed from bottom to up in a reverse
order. Is it possible to change it ?


- Kevin

Girish Kumar M.s

unread,
Feb 7, 2011, 7:27:17 AM2/7/11
to jqplot...@googlegroups.com
Just pass data series in reverse order.
one way i thought, thats it.


--
You received this message because you are subscribed to the Google Groups "jqplot-users" group.
To post to this group, send email to jqplot...@googlegroups.com.
To unsubscribe from this group, send email to jqplot-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jqplot-users?hl=en.




--
Regards
GirishKumarMs


Kevin Zhou

unread,
Feb 7, 2011, 2:33:49 PM2/7/11
to jqplot...@googlegroups.com
Hi Girish,

I have tried that, but one glitch is the legend then is also in reverse order.

- Kevin
Best regards

Kevin

Rafael Revi

unread,
Sep 17, 2012, 5:18:43 PM9/17/12
to jqplot...@googlegroups.com, zhou...@gmail.com
Hello Kevin,

Did you ever figure this out? I am running into the same issue.

Thanks in advanced

Rafael Revi

unread,
Sep 18, 2012, 11:19:47 AM9/18/12
to jqplot...@googlegroups.com, zhou...@gmail.com
Here is how you can change the order of the legend instead:

var legend = $("table.jqplot-table-legend tbody");
legend.children().each(function(i, tr){legend.prepend(tr)});
Reply all
Reply to author
Forward
0 new messages