Articles in this section
Category / Section

How to change the color of the header in the OLAP Chart axis?

1 min read

You can change the color of the header in the OLAP Chart axis by using the following code examples.


public MainWindow()
            this.olapchart1.OlapDataManager = new       
            Initial Catalog=Adventure Works DW 2008 SE;");
            this.olapchart1.Loaded += olapchart1_Loaded; 
void olapchart1_Loaded(object sender, RoutedEventArgs e)
            TextBlock textBlock = new TextBlock();
            textBlock.Text = "Header Text";
           textBlock.Foreground = new SolidColorBrush(Colors.Red);
            this.olapchart1.PrimaryAxis.Header = textBlock;



Public Sub New()
            Me.olapchart1.OlapDataManager = New  
            Source=; Initial Catalog=Adventure  
            Works DW 2008 SE;")
                AddHandler Me.olapchart1.Loaded, AddressOf olapchart1_Loaded
End Sub
Private Sub olapchart1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim textBlock As New TextBlock()
                textBlock.Text = "Header Text"
            textBlock.Foreground = new SolidColorBrush(Colors.Red);
            Me.olapchart1.PrimaryAxis.Header = textBlock
End Sub

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