Profile Picture

How to show a series on the top without re-adding all the series in the chart

Posted By Xiaolong Zhu 11 Years Ago

How to show a series on the top without re-adding all the series in...

Author
Message
Xiaolong Zhu
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 18, Visits: 1

Hi

we found the order of showing shape series is opposite the order of adding series. The series first added will be showed on the top of the chart. This brings a problem to us: we have a very complicate background with millions of small lines and we need to add a small series of points on the top of this chart while the user does some interactions. To make sure the points displayed on the top, we need to clear all the series and then add point series and finally add the background series again which has very bad impact on the performance while people manipulate the chart.

So is there any better ideas? Thanks.

Xiaolong

 



Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Xialong,

You can also use the series collection Insert method - for example:

chart.Series.Insert(0, someSeries);

inserts someSeries at the first index in the collection. Generally the performance of the visualization does not depend on how you add / remove series, but rather on the amount of data / presentation type. If you sends us a screenshot or a snippet of the chart configuration code we can comment which settings should improve performance.



Best Regards,
Nevron Support Team



Xiaolong Zhu
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 18, Visits: 1

HI

thanks for your reply.

our case is we want to draw many segment lines with different colors on the chart, these segment line are not continous so we add double.NaN after each segment line for break. Considering the performance, we classify these segment lines by colors. The segment lines have same color will be gouped and compose one NLineSeries.

We have abstracted the main logic from production code and built a small test program in the attachment and also put the screenshot in it, welcome to your any comments. thank!

 

xiaolong



Attachments
NevronTest.zipx (82 views, 147.00 KB)
Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi,

The approach that you use is fine, but there is also an option to use the Vector series. You can take a look at the following example in our Windows Forms demo application:

All Examples > All Examples > Chart Gallery > Vector > 2D Vector Series

Note that the arrowheads can be removed, so that just plain lines are displayed.

It is possible to either use only one series and assign custom colors for each arrow, or group the lines (by color) into different series. In either case no empty data points will be involved.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic