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.

C#

public MainWindow()
        {
            InitializeComponent();
            this.olapchart1.OlapDataManager = new       
            Syncfusion.Olap.Manager.OlapDataManager("Data 
            Source=http://bi.syncfusion.com/olap/msmdpump.dll;
            Initial Catalog=Adventure Works DW 2008 SE;");
            this.olapchart1.OlapDataManager.SetCurrentReport(SampleReport());
            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;
        }

 

VB

Public Sub New()
                InitializeComponent()
            Me.olapchart1.OlapDataManager = New  
            Syncfusion.Olap.Manager.OlapDataManager("Data 
            Source=http://bi.syncfusion.com/olap/msmdpump.dll; Initial Catalog=Adventure  
            Works DW 2008 SE;")
                Me.olapchart1.OlapDataManager.SetCurrentReport(SampleReport())
                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?
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