Change the chart axis appearance and the axis label font appearance

Applies to: Nevron Chart for .NET

How to change the chart axis appearance and the axis label font appearance?

To set the axis appearance and the axis label font appearance you can use the built-in Chart Editor.

To change the axis appearance from code you can take a look at the following example:

[C#]
NLinearScaleConfigurator linear = new NLinearScaleConfigurator();
  
//Setting the size and the color of the axis.
linear.RulerStyle.BorderStyle = new NStrokeStyle(5, Color.Red);
  
//setting the color, the font and the size of the text of the axis label.
linear.LabelStyle.TextStyle = new NTextStyle(new Font("Bauhaus 93", 10), Color.Blue);
  
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linear;

[VB.NET]
Dim linear As New NLinearScaleConfigurator()
  
'Setting the size and the color of the axis.
linear.RulerStyle.BorderStyle = New NStrokeStyle(5, Color.Red)
  
'setting the color, the font and the size of the text of the axis label.
linear.LabelStyle.TextStyle = New NTextStyle(New Font("Bauhaus 93", 10), Color.Blue)
  
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = linear

Article ID: 64, Created On: 10/6/2010, Modified: 11/15/2010