How to maintain label dimension constant


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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


Luca Azzoni
Luca Azzoni
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
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 (175 views, 13.00 KB)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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
Luca Azzoni
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
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-
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search