SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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.
We are evaluating SciChart for use in our product which includes displaying higher precision date time information that the .NET framework DateTime can provide (1 tick = 100ns resolution).
I started by sub-classing the AxisBase class, but I am having issues finding documentation that could help in implement certain methods.
Some of the methods below are outlined–but a full, custom axis example (i.e. example of DateTimeAxis) would be of even greater help.
IRange CalculateYRange(RenderPassInfo renderPassInfo) — Is this only used for YAxis? How does orientation affect the range?
List GetSupportedTypes() — Is this supported IRange types? What types are these?
IRange GetDefaultNonZeroRange() — Is this just the smallest non-Undefined range? Else what is default?
void CalculateDelta() — This has no parameters or return values. The documentation is not clear on what members must need to be set here. Without any example it seem impossible to know how to implement this.
Why does IRange define Diff as type T? In the case of DateRange Diff becomes DateTime. Shouldn’t diff be of type TimeSpan? Are the ticks in the DateTime simply used as a TimeSpan type value? (Assuming Diff is the span of the range). I could implement IRange and use different types (DateTime and TimeSpan) respectively for Min/Max and Diff in this case (assuming I don’t need the templated version of the type.
We spoke on support ticket which is why this forum post went unanswered, but for the benefit of the community:
Unfortunately in SciChart we have to perform all calculations with the highest-precision, highest dynamic range data-type, which is System.Double. This gives us 53 bits of mantissa, 11 bits of exponent and 1 sign bit.
System.Long has 63 bits for the actual number and 1 bit for sign.
We cannot use System.Decimal for intermediate calculations, as while this has massive precision it has a smaller dynamic range than double.
There is no Long-Double or Double-Double datatype in .NET allowing higher precision in some cases. There are emulated libraries that do 128bit Double or Quad Double but they are very slow.
As a result you have hit the limit of numeric precision and this cannot be easily solved. Precision in SciChart starts in the DataSeries, in the Axis and also in Series drawing so there are far more places to change to achieve higher precision than just the axis.
What we propose for our customers as a workaround is to log the timestamp as a double value, and use our LabelProvider to change the date.
Please login first to submit.