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.
At the moment we only support the following types for TX,TY in data series:
DateTime, TimeSpan, Double, Float, Long, ULong, Int, Uint, Short,
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.
I’ll leave it for now. Thanks
- 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 login to post comments
Please login first to submit.