Pre loader

Support more generic type parameters for X and Y

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,

TX and TY in XyDataSeries<TX,TY> are currently subject to some unclear constraints to do with the internal implementation of SciChart. Would it be possible to either remove these constraints or expose them as interfaces and .NET generic type constraints on XyDataSeries<TX,TY>?

Specifically, I’d like to enable ulong as a valid TX and my own complex data type as a TY. I’m creating a CustomRenderableSeries where each point has x, y, shape, colour and size. I can encode these data within the bytes of e.g. an XyzDataSeries<DateTime,double>, but its inconvenient, hacky and unclear. It would seem more natural to create a type to contain those fields and then have a XyDataSeries<DateTime, MyPointData>

I can make MyPointData IComparable and anything else that is required.

Any thoughts?

Cheers
Felix

  • You must to post comments
0
0

I’ll leave it for now. Thanks

Felix

  • Andrew Burnett-Thompson
    Ok no problem Felix. You have given me an idea though to constrain TY by IPoint where IPoint : IComparable and see if we can work this in to the API. It would benefit other users. I can't give you a date but its something we will investigate in future
  • You must to post comments
0
0

Great thanks! This might actually allow us to remove a whole translation layer in our application, as well as enabling unlimited types of CustomRenderableSeries.

Regards

  • You must to post comments
0
0

Hi Felix

At the moment we only support the following types for TX,TY in data series:

Supported Data Types in DataSeries

DateTime, TimeSpan, Double, Float, Long, ULong, Int, Uint, Short,
UShort, Byte

We do not currently support custom datatypes, such as MyClass : IComparable, because too much occurs inside the SciChart core that requires TX or TY is a numerical type. I could only suggest at this time, if you have access to the source code, attempting to retrofit support for TX or TY = a custom type, however I cannot guarantee it will work. Happy to talk you through it if you do wish to attempt this.

Best regards,
Andrew

  • You must to post comments
Showing 3 results
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