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
265
UltraDataChart marker on selected points
posted

I am using WInforms UltraDataChart v18.1.  I have line series data of about 100 points.  I would like to mark (put a box around) selected points.  So out of the 100 points I want to mark only two.  These marks show the start and end of a baseline.

Is there any way to do this with UltraDataChart or XamDataChart?

Thanks

Parents
No Data
Reply
  • 34430
    Verified Answer
    Offline posted

    Hello James,

    I have been investigating into this behavior you are looking to achieve, and there are a couple of recommendations I can make to achieve this with the UltraDataChart.

    The first is to use an additional PointSeries to your LineSeries. If you have a property to use as a ValueMemberPath that is a nullable double?, you can return null for the points that you do not wish to be shown, and then return a value for the points that you want a marker drawn at.

    The alternative in this case would be to use a custom MarkerTemplate for your LineSeries. This property takes a CustomRenderTemplate, who you need to pass a new DataTemplateRenderHandler and DataTemplateMeasureHandler to the Render and Measure properties of, respectively. Both of these elements take a method as their constructor’s parameter, and these methods are voids that take a DataTemplateRenderInfo and DataTemplateMeasureInfo, respectively.

    It appears that for some reason, the Infragistics.Controls.Charts.DataContext object that is returned by the DataTemplateRenderInfo.Data property is an internal type, and so to actually get your underlying data item, I would have to recommend using reflection. This type should not be internal, in my opinion, though, and so I will be bringing this up with our development teams.

    I am attaching a sample project to demonstrate the custom marker template to only highlight a couple of LineSeries points. I hope this helps you.

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

    UltraDataChartMarkerTemplateDemo.zip

Children