SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


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)

  • You must to post comments

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,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.