SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I am using the CategoryDateTimeAxis to fetch data in minute resolution for a few days and then append realtime data in one second resolution to it. Since the CategoryDateTimeAxis uses equidistance calculations I was wondering if it is possible to override that behaviour somehow? I.e. can I control the distance calculation somehow?
I am currently switching to CategoryDateTimeAxis because DiscontinuousDateTimeAxis provides to much of a performance hit for our use case.
No, there’s no easy way to do this unfortunately. What you’d have to do is create a custom axis and custom coordinate calculator using our source code as a guideline. Each axis is a combination of AxisBase derived class, and CoordinateCalculatorBase derived class. So for example LogarithmicNumericAxis has LogarithmicCoordinateCalculator, and CategoryDateTimeAxis has CategoryCoordinateCalculator.
Each calculator does the transformations from pixel to data coordinates (and back) as well as simple operations such as pan, translate, zoom. These calculators are used in drawing as well as axis scaling.
There are no examples for this I’m afraid, as it’s not a standard feature in SciChart.
Another idea for you is to use the DiscontinuousDateTimeAxis but provide a custom calender that is lightweight and skips ranges. Take a look at our DiscontinuousDateTimeCalender implementation in code and see how we’ve done it. We don’t have a code example but one of our customers implemented their own calender and achieved a huge speedup in performance for this axis type, assuming simpler rules such as ‘only weekends ignored’
Please login first to submit.