Hello,
We use 2D and 3D charts. The user can switch between Liner Scale and Logarithmic scale only on certain axis of the chart (say Y-axis on 2D chart and 3D Chart). In the linear scale, the axis range is calculated based on the data and is set manually
NevronAxis.View = new NRangeAxisView(new NRange1DD(range.Min, range.Max), true, true);
When the user switches to logarithmic scale, we just change the scale of the chart to logarithmic scale.
m_logarithmicScaleConfigurator = new NLogarithmicScaleConfigurator
{
RoundToTickMax = false,
RoundToTickMin = false,
InflateViewRangeBegin = false,
InflateViewRangeEnd = false,
MajorGridStyle = { LineStyle = { Pattern = LinePattern.Dot } },
LogarithmBase = 10,
TransformScale = true,
Title = new NScaleTitleStyle{Angle = new NScaleLabelAngle { LabelAngleMode = ScaleLabelAngleMode.Scale }}
};
m_logarithmicScaleConfigurator.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true);
NevronAxis.ScaleConfigurator = logarithmicScaleConfigurator ;
NevronAxis.UpdateScale();
The min and max of the axis scale can be either in auto scale mode or manual scale mode.
If the axis scale (min,max) are in autoscale mode
NevronAxis.View = new NRangeAxisView(new NRange1DD(range.Min, range.Max), false, false);
If the axis scale(min,max)are in manual mode
NevronAxis.View = new NRangeAxisView(new NRange1DD(range.Min, range.Max), true, true);
If the axis min scale is in manual mode and max scale in auto
NevronAxis.View = new NRangeAxisView(new NRange1DD(range.Min, range.Max), true, false);
If the axis min scale is in automode and max scale in manual
NevronAxis.View = new NRangeAxisView(new NRange1DD(range.Min, range.Max), false, true);
After this the referesh of the chart control is called.
When the range is set for the logarithmic , the curve on the chart does not always appear in the chart area correctly.
The attached immages (2D chart.jpg and 3D chart.jpg) illustrate this.
When the scale is swithed to linear scale, there is no issue. It happens only in logarithmic scale.
I have tried to use the CalculateAxis() and/or RecalcLayout() after setting the range but it did not resolve the issue.
How can I correct this issue? I am blocked on this issue
Thank you very much for your help.
Best Regards,
Siraj