Pre loader

fixed number of 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

Hi,

I need to accomplish the next scenario:
i have a real time financial graph that looks like the one in the attached screenshot.
The captured position of the graph is perfect, it has 4 ticks and the series is positioned in the middle.

i have done this by defining the following YAxis:

YAxis = new NumericAxis
{
AutoTicks = true,
MaxAutoTicks = 4,
Id = "YAxisID",
TextFormatting = "#.######",
TickTextBrush = Brushes.White,
BorderBrush = Brushes.Black,
AxisTitle = "Rates",
AxisAlignment = AxisAlignment.Left,
DrawMajorGridLines = true,
DrawMinorGridLines = false,
BorderThickness = new Thickness(2, 2, 2, 2),
//MinorDelta = 0.00001,
//MajorDelta = 0.0001,
AutoRange = true,
AutoAlignVisibleRange = true,
GrowBy = new DoubleRange(2, 2)

  };

now, the problem is that i have MaxAutoTicks set to 4, but because the chart is dynamic and changes dynamically from a delta of 0.0001 to 0.001 (for example), the number of ticks always changes from 1 to 4 and the chart is zooming in and out…
what i need is to set the number of ticks to a fixed number of 4 and that the series will always be in the middle as in the screenshot and not zoomed in and out all the time – the only thing that can be changed are the values of the ticks of the Y axis…is that possible to accomplish?

Thanks,

Alex

Images
  • You must to post comments
0
0

Hello Alex,

I would suggest using fixed VisibleRange for YAxis. You should set AutoRange = False, VisibleRange = new DoubleRange(DesiredMin, DesiredMax).

Please, try this approach and let us know if it solves your problem.

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies