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
410
Customize LineSeries
posted

I need to change the way LineSeries render line segments. What would be the best way to achieve this? Should I create a completely new custom series or can I somehow override only the RenderSeriesOverride method of LineSeries? Please advise.

Thank you!

  • 34690
    Offline posted in reply to Jack Martins

    Hello Jack,

    As more of a start to achieving your requirement, I would like you to see the following forum thread where I had built a custom ScatterLineSeries for another community member: http://es.infragistics.com/community/forums/t/88072.aspx. Attached to that forum thread, you will find a sample project named "CustomScatterSeries.zip," and this should give you some insight on how you can create the line segments in the XamDataChart.

    I would like to add that with the current implementation of the LineSeries in the XamDataChart, each of the series is a single path object, and not multiple line segments. This is done intentionally for performance purposes, and if you have a large amount of data in your XamDataChart, you may see performance issues if you try to achieve a LineSeries broken up into smaller segments, especially when zooming and resizing the chart.

    If you still require assistance on this matter, would it be possible for you to please elaborate a little bit on the actual requirement that you are looking to achieve, as a custom series may not be entirely necessary on this matter?

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

    Sincerely,
    Andrew
    Associate Developer

  • 34690
    Verified Answer
    Offline posted

    Hello Jack,

    Thank you for your post.

    There isn't currently a way to override only the RenderSeriesOverride method of the LineSeries, and as the LineSeries class is sealed, you cannot really derive from LineSeries at all. So, in order to override the RenderSeriesOverride method of a particular series, at the moment, you will need to create a new custom series, perhaps derived from the HorizontalAnchoredCategorySeries class, would be your best bet.

    I can't really know whether or not I would truly recommend a custom series here, though, as I am rather unsure of your requirement. Would it be possible for you to please elaborate a bit more on what your actual requirement is, such that I may be able to suggest an alternative to a custom series?

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

    Sincerely,
    Andrew
    Associate Developer