Pre loader

Pass custom Type to XyDataSeries

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

hi,
I have a class DigitalData and I want to create XyDataSeries as XyDataSeries<DigitalData, DateTime>

How can I pass this XyDataSeries to a renderable series viewmodel and I how can I use Index to plot in y axis as I am passing DigitalData to XyDataSeries.

public class DigitalData
{
public double Index { get; set; }
public DigitalQuality DigitalQuality { get; set; }
public DigitalState DigitalState { get; set; }
}

Please let me know if you are not clear.

Version
latest
  • You must to post comments
0
0

This is not possible. The XyDataSeries type only allows the following types to be used as generic parameters:

  1. Int / UInt
  2. Long / ULong
  3. Double / Float
  4. Short / UShort
  5. DateTime / TimeSpan
  6. Byte / SByte

If you want to add custom information onto a datapoint, then please see our PointMetadata API here.

DataSeries now feature optional PointMetadata – a class which can be tagged onto one or more X,Y data-points, and passed through to all stages, including PaletteProvider, Hit-Test and Tool-tips.

The DataSeries API expects an IPointMetadata derived type to be passed in. This can be any class you like. It will be passed through to the PaletteProvider, Tooltips, PointMarkers and Hit-Test API and can be used to tag additional data to a data-point.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies