Articles in this section
Category / Section

How to customize OLAPChart labels, Y-axis values and gridlines?

1 min read

You can customize OLAPChart labels, values, color and spacing of gridlines using the following code examples.

Rotating Axis Labels

Axis labels can be rotated using RotateAngle property. You can refer to the following code examples.

C#

this.olapChart1.PrimaryXAxis.GroupingLabels[0].RotateAngle = 45;

 

VB

Me.olapChart1.PrimaryXAxis.GroupingLabels(0).RotateAngle = 45

 

Formatting values on Y-axis ($, comma etc…)

Y-Axis values can be formatted by using Format property.

C#

this.OlapChart1.PrimaryYAxis.Format = "$0,000,000.000";

 

VB

Me.OlapChart1.PrimaryYAxis.Format = "$0,000,000.000"

 

Applying color and spacing of gridlines

Color and spacing of the gridlines can be applied using the following code examples.

C#

this.olapChart1.PrimaryXAxis.LineType.ForeColor = Color.FromArgb(155, 178, 242);
this.olapChart1.PrimaryYAxis.LineType.ForeColor = Color.FromArgb(155, 178, 242);
//Spacing between gridlines depends on the value DesiredIntervals.
this.OlapChart1.PrimaryYAxis.DesiredIntervals = 2;

 

VB

Me.olapChart1.PrimaryXAxis.LineType.ForeColor = Color.FromArgb(155, 178, 242)
Me.olapChart1.PrimaryYAxis.LineType.ForeColor = Color.FromArgb(155, 178, 242)
'Spacing between gridlines depends on the value DesiredIntervals.
Me.OlapChart1.PrimaryYAxis.DesiredIntervals = 2

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied