Profile Picture

NLogarithmicScaleConfigurator

Posted By Carlos Hernandez 10 Years Ago
Author
Message
Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Carlos,

When you specify the ticks in this way it actually means that the ticks are power of ten. This leads to very large numbers that are outside the axis range. To fix the problem you need to specify that the ticks should not be transformed - for example:

         NChart chart = nChartControl1.Charts[0];

         NPointSeries bar = new NPointSeries();

         bar.Values.Add(10);
         bar.Values.Add(20);
         bar.Values.Add(10000);

         chart.Series.Add(bar);

         NLogarithmicScaleConfigurator scale = new NLogarithmicScaleConfigurator();
         scale.CustomMajorTicks = new NDoubleList(new double[] { 1, 10, 100, 1000, 10000 });
         scale.TransformScale = false;
         scale.MajorTickMode = MajorTickMode.CustomTicks;
         scale.LogarithmBase = 10;

         chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator = scale;

Best Regards,
Nevron Support Team



Carlos Hernandez
Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 1, Visits: 1
I have configured custom Major ticks, but they don't seem to work. I was wondering if there was an example of I could referred to.

y1ScaleConfigurator.CustomMajorTicks = new NDoubleList(new double[] { 1, 10, 100, 1000, 10000 });
y1ScaleConfigurator.MajorTickMode = MajorTickMode.CustomTicks;

Also for the LabelValueFormatters can I have the labels displayed using a base of 10.

I thought the following option would help, but apparently not.


y1ScaleConfigurator.LogarithmBase = 10;



Similar Topics


Reading This Topic