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)
- youbit asked 8 years ago
- You must login 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:
Take a look, it might give you just the idea you need!
Best regards,
Andrew
- Andrew Burnett-Thompson answered 8 years ago
- You must login to post comments
Please login first to submit.