Profile Picture

Cartesian chart - axis label font sizes

Posted By Kevin Harrison 11 Years Ago
Author
Message
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: Last Week
Posts: 3,054, Visits: 4,009

Hi Kevin,

You can achieve this behaviour using relative units for the font size - the following code for example:

NChart chart = nChartControl1.Charts[0];

NOrdinalScaleConfigurator scaleX = chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NOrdinalScaleConfigurator;
scaleX.LabelStyle.TextStyle.FontStyle.EmSize = new NLength(5, NRelativeUnit.ParentPercentage);

NLinearScaleConfigurator scaleY = chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator as NLinearScaleConfigurator;
scaleY.LabelStyle.TextStyle.FontStyle.EmSize = new NLength(5, NRelativeUnit.ParentPercentage);

Configures the labels to use dynamically resizable font size depenidng on the size of the control. Let us kwon if you have any questions or meet any problems.



Best Regards,
Nevron Support Team



Kevin Harrison
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865

Do I have any control over the axis label font sizes? I have an implementation which hides the axis labels when the chart size is reduced beyond a certain point, but the labelling font size remains the same as the chart size is reduced up to this point.

It would be good if there was an option for the axis label font size to scale with the chart size. Is this already there and I've missed it, or is there another mechanism you suggest?

Thanks

Kevin





Similar Topics


Reading This Topic