Pre loader

Fixed grid and automatic scaling of axes to provide people friendly ticks

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

On graphs with many axes it can often be difficult to read as the tics don’t line up with grid-lines.

What I would like to try is having a fixed number of grid lines (either a set number or based on the size of the graph) and then having all axis ticks aligned with the grid. To make the ticks human friendly I would then want to slightly zoom out each axis so that tics become nice numbers.

I am imagining it would also need to slightly adjust the zoom levels each time user interactions interact with the graph, i.e. if the user was to use a rubberband modifier to zoom in, I would expect I would need to hook in somehow to zoom out very slightly to get nice numbers on the tics, as they can no longer float about to nice values.

Is there any easy way I could experiment with something like this.

Version
7
  • Lex
    • Lex
    • 9 months ago
    Hi Hugh, I discussed your inquiry with our team. Could you please clarify if the zoom level feature is related to the misaligned ticks issue you’ve mentioned? Please also share a picture or mockup showing the described behavior. Thanks in advance, Lex SciChart Technical Support Engineer
  • Hugoagogo
    To try and clarify, say I have a plot with two series, and two Y axes. With default behaviour the first axis will select its ticks to generate nice values (last digits multiples of 1,2,5 i believe) the grid is then aligned with these ticks. I would like the ticks on the second axis to also be aligned with the grid. I can see how I could achieve this in a primitive way by using a custom tick provider to generate a fixed number of ticks for each axis so that they have to line up with the grid. https://www.scichart.com/documentation/win/current/webframe.html#Axis%20Ticks%20-%20TickProvider%20and%20DeltaCalculator%20API.html However you then loose having nice values for each tick, so ideally what I was wanting to try to achieve is a system where when ticks are being assigned the axis would be zoomed out slightly if required to make it so the ticks fall on nice values. As an example, say we configure out axis to have 5 fixed ticks, and there is a visiblerange of 5.32 to 7.2, we would end up with ticks with values 5.32,5.79,6.26,6.73,7.2 which is pretty ugly with intervals of 0.47, however if we pad the visible range very slightly to 5.25 to 7.25 we end up with tick values of 5.25,5.75,6.25,6.75,7.25 which is intervals of 0.5 and is more pleasing to the eye (at least in my opinion). I guess the question is, is there any built in way to achieve this. And if not do you have any pointers on how this could be achieved, I am guessing I would need to somehow combine the functionality of a customtick provider and a viewport manager but am not sure how I would get to make them work together.
  • You must to post comments
0
0

Hi Hugh,

I’m glad to inform you that SciChart v8.0 featuring improvements related to your inquiry has been released recently.
Here you can find more details regarding the new features and fixes provided with the latest release:
https://www.scichart.com/scichart-wpf-v8-0-released/

Please try it out and let us know your feedback.

With best regards,
Lex,
SciChart Technical Support Engineer

  • You must to post comments
0
0

Hi Hugh,

Thank you for the provided details. We’ve discussed your inquiry.

To achieve the described Axis Ticks’ behavior we recommend setting VisibleRange manually for the Axis and setting MajorDelta and MinorDelta properties.
You can find the links to the corresponding documentation articles below.
The article regarding VisibleRange:
https://www.scichart.com/documentation/win/current/webframe.html#Axis%20Ranging%20-%20AutoRange%20and%20VisibleRange.html

And regarding Deltas:
https://www.scichart.com/documentation/win/current/webframe.html#Axis%20Ticks%20-%20MajorDelta,%20MinorDelta%20and%20AutoTicks.html

With best regards,
Lex
SciChart Technical Support Engineer

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.