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
110
Display Marker values only for the Max and Min value on the LineSeries.
posted

I have a xamDataChart LineSeries with 500 X-axis values and Y Axis values.

I want to display Markers with the values for only the maximum and minimum points on the line series.

something like this but values should be visible only for Red and Blue circle not for all data points.

Any thoughts?

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello Preeti,

    In order to have markers for only the minimum and maximum points in the XamDataChart, I would recommend having a property on your underlying data item that designates it as the minimum or maximum point. You can then handle this in your underlying view model by querying your data item and finding the maximum and minimum values of the property that will correspond to the value member paths of your series.

    In doing this, you can then create a MarkerTemplate and bind the Visibility and Fill colors of an Ellipse element in the case of your screenshot to your Item.IsMin and Item.IsMax values. Using an IMultiValueConverter, you can then check these values and return the corresponding Visibility and Fill colors.

    I have attached a sample project to demonstrate the above. I hope this helps you.

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

    XamDataChartMinMaxMarkersCase.zip

Reply Children
No Data