Group: Forum Members
Last Active: 13 Years Ago
Posts: 6,
Visits: 1
|
I'm using the following code to generate a custom logarithmic scale for my Y axis:
NLogarithmicScaleConfigurator logarithmicScale = new NLogarithmicScaleConfigurator(); logarithmicScale.CustomMajorTicks.Clear(); logarithmicScale.MajorTickMode = MajorTickMode.CustomTicks; for (double i = min - 5; i <= max + 5; i = i + 5) logarithmicScale.CustomMajorTicks.Add(i); logarithmicScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true); logarithmicScale.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot; logarithmicScale.MajorGridStyle.LineStyle.Color = Color.Black; logarithmicScale.MinorGridStyle.SetShowAtWall(ChartWallType.Back, false); logarithmicScale.UseOrigin = false; logarithmicScale.ViewRangeInflateMode = ScaleViewRangeInflateMode.MajorTickExtend; logarithmicScale.InflateViewRangeBegin = true; logarithmicScale.InflateViewRangeEnd = true; logarithmicScale.RulerStyle.BorderStyle.Color = Color.Black; logarithmicScale.OuterMajorTickStyle.LineStyle.Color = Color.Black; logarithmicScale.InnerMajorTickStyle.Length = new NLength(0); logarithmicScale.OuterMajorTickStyle.Length = new NLength(2); logarithmicScale.LabelStyle.TextStyle.FillStyle = new NColorFillStyle(Color.Black);
Using this code the axis just shows no labels or gridlines (so I can not say if it is scaled logarithmically or not).
Just changing the first line to:
NLinearScaleConfigurator logarithmicScale = new NLinearScaleConfigurator();
and my code works as expected. Did I find a bug or am I missing something here?
Regards, Matthias.
|