Articles in this section
Category / Section

How to change the label border style and text alignment in OLAP Chart?

1 min read

You can change the label border style and alignment of the label text in OLAP Chart using the following code example.

C#

void OlapChart_PreRender(object sender, EventArgs e)
        {
            foreach (ChartAxisGroupingLabel groupingLabel in this.OlapClient1.OlapChart.PrimaryXAxis.GroupingLabels)
            {
                groupingLabel.BorderStyle = ChartAxisGroupingLabelBorderStyle.WithoutTopAndBottomBorder;
                groupingLabel.LabelTextAlignment = ChartAxisGroupingLabelTextAlignment.Bottom;
            }
        }

VB

Private Sub OlapChart_PreRender(ByVal sender As Object, ByVal e As EventArgs)
                                                For Each groupingLabel As ChartAxisGroupingLabel In Me.OlapClient1.OlapChart.PrimaryXAxis.GroupingLabels
                                                                groupingLabel.BorderStyle = ChartAxisGroupingLabelBorderStyle.WithoutTopAndBottomBorder
                                                                groupingLabel.RotateAngle = 0
                                                                groupingLabel.LabelTextAlignment = ChartAxisGroupingLabelTextAlignment.Bottom
                                                Next groupingLabel
End Sub

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