Hi Steema --
Without recoding my javascript too much -
Is there an easy way to move one series in front of another as it's being blocked.
I know I can recode and the series in a different order but I do a lot of index based updates and such and would rather not have to change that.
is there a Z-Order property or MoveSeriesUp or something like that?
Thanks so much,
Joseph
Easy way to Move Series in front of Another
Easy way to Move Series in front of Another
- Attachments
-
- Need to move blue line forward.
- moveforward.gif (90.84 KiB) Viewed 12481 times
Re: Easy way to Move Series in front of Another
Hello,
The series are in an array you can swap elements from as with any array. Ie:
If you want to do it with a function:
And then:
The series are in an array you can swap elements from as with any array. Ie:
Code: Select all
var tmp = Chart1.series.items[0];
Chart1.series.items[0] = Chart1.series.items[1];
Chart1.series.items[1] = tmp;
Code: Select all
Array.prototype.swap = function(a, b) {
var temp = this[a];
this[a] = this[b];
this[b] = temp;
};
Code: Select all
Chart1.series.items.swap(0,1);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Easy way to Move Series in front of Another
Hi Yeray --
I think this is the same as just adding the series to the chart in a different order.
All my code that is array based will still have to be modified.
I was hoping for an answer that wouldn't require change all my array based index code.
Such as Series1.ZOrder = 0 or something like that.
I do appreciate your help however.
I'll just rewrite my code it's not a huuuuge deal.
Thanks again.
Joseph
I think this is the same as just adding the series to the chart in a different order.
All my code that is array based will still have to be modified.
I was hoping for an answer that wouldn't require change all my array based index code.
Such as Series1.ZOrder = 0 or something like that.
I do appreciate your help however.
I'll just rewrite my code it's not a huuuuge deal.
Thanks again.
Joseph