Pre loader

How to change my Numerical Axis to LogarithmicNumericAxis?

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

1
0

I changed my NumericalAxis to LogarithmicNumericAxis in runtime as below

var yAxis = new LogarithmicNumericAxis
{
    TextFormatting = "#.#E+0",
    ScientificNotation = ScientificNotation.LogarithmicBase,                                
    GrowBy = new DoubleRange(0.1, 0.1),
    DrawMajorBands = false
};
yAxis.AxisTitle = chart2d.YAxes[0].AxisTitle;
chart2d.YAxes[0] = yAxis;

I can see my data points are correctly log-scaled but Y-Axis is disappeared and CursorModifier display Y-values as ‘NaN’.
Should I do something more than simply replacing Axis instance to other?
(I already checked a LogAxis example but I can’t use XAML in this case)

Version
4.0.5.8246
  • You must to post comments
0
0

Hi there,

You probably need to set a valid VisibleRange on the LogarithmicNumericAxis as well, but I’m not sure.

We actually have an example on switching between Linear and Logarithmic Axis at Runtime in WPF Charts here:

enter image description here

Take a look, it might give you just the idea you need!

Best regards,
Andrew

  • 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