How to add axis titles to a WPF OLAP Chart?
This article explains how to add descriptive text below the chart series in a Syncfusion WPF OLAP Chart. By setting the Header property of the primary axis, you can display custom text beneath the series area, which helps provide context or titles for the visualized data.
This customization is useful for adding chart titles, annotations, or explanatory text aligned with the series.
Follow these steps to add text below the series in the WPF OLAP Chart:
Step 1: Initialize the Chart and Attach the Loaded Event
Configure the OLAP Chart and attach the Loaded event to apply the axis header once the chart is rendered. For more information, refer this getting started documentation
this.olapChart.Loaded += OlapChart_Loaded;
AddHandler Me.olapChart.Loaded, AddressOf OlapChart_Loaded
Step 2: Set Text Using the Axis Header
In the Loaded event, assign the desired text to the Header property of the primary axis.
void OlapChart_Loaded(object sender, RoutedEventArgs e)
{
this.olapChart.Series[0].Area.PrimaryAxis.Header = "OLAP Chart";
}
Private Sub OlapChart_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Me.olapChart.Series(0).Area.PrimaryAxis.Header = "OLAP Chart"
End Sub
Output
Conclusion
I hope you enjoyed learning how to add text below the series in a WPF OLAP Chart.
You can refer to our WPF OlapChart featuretour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WPF OLAP Chart demo to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!