Pre loader

Y axis does not scale even if Visible range is set

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

I am creating the dynamic Numeric Y axis. Tthese are the attributes i am setting

axis.VisibleRange = new VisibleRange (0, 100) 
axis.AxisTitle = axisViewModel.Title; 
axis.AutoRange = AutoRange.Never 
axis.AxisAlignment = axisViewModel.AxisAlignment; 
axis.BorderBrush = axisViewModel.BorderBrush; 
axis.BorderThickness = axisViewModel.BorderThickness; 
axis.TextFormatting = axisViewModel.TextFormatting; 
axis.DrawMajorGridLines = axisViewModel.DrawMajorGridLines; 
axis.DrawMinorGridLines = axisViewModel.DrawMinorGridLines; 
axis.DrawMajorTicks = axisViewModel.DrawMajorTicks; 
axis.DrawMinorTicks = axisViewModel.DrawMinorTicks; 
axis.GrowBy = axisViewModel.GrowBy; (0.1, 0.1) 
axis.TickTextBrush = axisViewModel.TickTextBrush; 

still it is auto ranging. Am I missing some attribute

  • You must to post comments
0
0

Hi Harishtei,

AutoRange.Never means exactly that: never autorange. If you are setting a VisibleRange and setting AutoRange.Never, the YAxis will not autorange. Unless ….

  • You call SciChartSurface.ZoomExtents()
  • You use RubberBandXyZoomModifier with IsXAxisOnly = true
  • You override ViewportManager and set your own ranging algorithm
  • You later set AutoRange to Once or Always
  • You set an invalid range (for instance, VisibleRange=0,100 is valid on NumericAxis, but not valid on LogarithmicNumericAxis).

Perhaps you can check your code again?

Best regards,
Andrew

  • Łukasz .
    Question was not why it doesn’t auto range but why VisibleRange set is not applied. And answer is: it isn’t applied since 0 is incorrect min value for logarithmic axis. Both min and max must be greater than 0.
  • 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