axis index and series index

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

axis index and series index

Post by fredd41 » Fri Sep 12, 2014 2:45 pm

Hi

It could be nice if we could retrieve the index of an axis in the axis list.
A property like indexOf or GetIndex.

Same thing for a series in the sampledataseries list.

Also functions like SendtoBack, BringtoFront, MoveUp, MoveDown could be nice to move an axis or a series in the list.


thanks

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: axis index and series index

Post by ArctionPasi » Mon Sep 15, 2014 8:48 pm

The List collection properties have these:

Axis index:
int axisIndex = chart.ViewXY.XAxes.IndexOf(axisX);

Series index:
int seriesIndex = chart.ViewXY.SampleDataSeries.IndexOf(series);


The order of series or axes list tell the rendering order. Change the list order.
Moving list item one step earlier:

AxisX moveThis = chart.ViewXY.XAxes[5];
chart.ViewXY.XAxes.RemoveAt(5);
chart.ViewXY.XAxes.Insert(4, moveThis);

That should work.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: axis index and series index

Post by fredd41 » Mon Sep 15, 2014 9:17 pm

if I remove and insert the axis the series doesn't follow the axis

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: axis index and series index

Post by ArctionPasi » Tue Sep 16, 2014 5:25 am

True, it doesn't because it has AssignXAxisIndex or AssignYAxisIndex defined and now that index refers to different axis after moving the axis in the list.

Set these properties to match the new axis index.
LightningChart Support Team, PT

Post Reply