Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
360
Hiding series on XamDataChart
posted

I have a lot of series on my XamDataChart - sometimes as many as 2000 or so. Calling MyChart.Series.Clear() takes upwards of 30-40 seconds. Is there a way I can just hide the series I do not need to display? I tried setting the visibility, but then the series object was still shown on the Y axis. I'm using a ScatterPolylineSeries with a NumericXAxis and a NumbericYAxis.

Parents
  • 34810
    Offline posted

    Hello Josh,

    I have been investigating into the behavior you are seeing, and it is valid to set the Visibility of the different series in the XamDataChart. I am under the impression that by you saying that “the series object is still being shown on the Y-Axis,” you mean that the Y-Axis is not changing to accommodate the visible series? This is expected, as the series is still plotted in the chart and the axis takes that into account more-so than the visibility of the series.

    It is worth noting that the NumericX and NumericY axes both have MinimumValue and MaximumValue properties, and so you can calculate this yourself based on the visible series’ data sources if you wish, but this may not be something viable for you.

    Something I am curious about in this case is the usage of 2,000 ScatterPolylineSeries in this case. Is there a reason you are using so many series? Perhaps some of these series could be combined as the data source of the ScatterPolylineSeries can be a List<List<Point>> where each inner List<Point> is a line segment?

    Please let me know if you have any other questions or concerns on this matter.

Reply Children