SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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

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
0
0

I’ll leave it for now. Thanks

Felix

  • Andrew
    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
Showing 3 results
Your Answer

Please first to submit.