Profile Picture

How to maintain label dimension constant

Posted By Luca Azzoni 11 Years Ago
Author
Message
Luca Azzoni
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 4, Visits: 1
Hi Nevron,

My chart is contained in a NContentPanel that has a fixed width and also it has a Y axis with its NLinearScaleConfigurator that sometimes is updated with LabelValueFormatter that adapts labels that sometimes are smaller and sometimes are bigger depends on decimal values.

The visual effect is not very good because the font size changes depending on the decimal values so the labels are difficult to read.

How could I maintain the font size constant maintaining also constant the width of NContentPanel ?
Thanks-

Nevron Support
Posted 11 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: 1 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Luca,

The font size can change due to one of the following reasons:

1. The axis uses automatic auto scaling to resolve overlapping labels.

2. The axis zone bounds exceed the maximum specified zone bounds (by default 30 percent of the plot area).

Can you send us a screenshot of the chart you're having problems with for review?



Best Regards,
Nevron Support Team



Luca Azzoni
Posted 11 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 4, Visits: 1
Hello,
Thanks for your reply. You can find in the attachment the image.

Perhaps another idea is to adapt the panel with: larger when label with increase and smallest when the label with decrease. But how can I found the label size?

I'am telling this because the size retrieved by myScaleconfigurator.LabelStyle.TextStyle.FontStyle.EmSize it is always the same it didn't change.

Attachments
Color Scale_2.png (153 views, 13.00 KB)
Nevron Support
Posted 11 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: 1 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Luca,

Please elaborate on the problem - as mentioned above the control can automatically scale the labels sizes if it encounters one of the above conditions - you can switch off both using:

NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.MaxDockZoneMargins =
new NMarginsL(10000);
((
NStandardScaleConfigurator)(chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator)).LabelFitModes = new LabelFitMode[0];
((
NStandardScaleConfigurator)(chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator)).LabelFitModes = new LabelFitMode[0];

Hope this helps - let us know if you meet any problems...



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic