Stipulating the z-order of my charts

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Jose on 27th April 2014
I have 4 series that given their relative importance I want to appear in this order:


However, the latter series are overwriting the former (using the line graph), so 2 overwrites 1, 3 overwrites 1 and 2, and 4 overwrites 1, 2, 3.

When they overlap, the visible colour is the one from the last series (which I wanted to appear at the bottom of the legend because they were less important).

So, is there a way of specifying the z-order for each series, or the order of the series in the legend?

Regards, Jose.
Posted by Richard on 28th April 2014
Hi there,

The only way would be to put the data series that you want "at the back" would be to specify it first. You can use the arrayReverse function to then reverse the order of the key array:

var key = ['Richard','Bob','Lucy','John';
     key = RGraph.arrayReverse(key);


Add a reply

« Back to message list