XAML Configuration in WPF Olap Chart

6 May 20211 minute to read

XAML configuration is one of the important features of the OLAP chart, as it helps users to configure the control entirely through XAML by eliminating the required code in code behind.


  • DataSource.ConnectionString: Specifies the connection string of the data manager.
  • DataSource.ConnectionName: Specifies the connection name, which is available in the App.Config file of the application.
  • DataSource.DataManagerName: Specifies the data manager name.
  • SharedDataManagerName: Specifies the data manager name, which is available in the shared data manager collection.
  • ReportName: Specifies the OLAP report name.
  • CurrentCubeName: Specifies the current cube name of an OLAP report.
  • CategoricalAxis: Specifies the categorical axis of the OLAP report.
  • SeriesAxis: Specifies the series axis of the OLAP report.
  • SlicerAxis: Specifies the slicer axis of the OLAP report.
  • CalculatedMembers: Specifies the calculated members of the OLAP report.

Adding an OLAP report to the OLAP chart in design time is described in the following code sample.

  • XAML
  • <syncfusion:OlapChart x:Name="olapChart" HorizontalAlignment="Stretch" ReportName="SalesReport"
    		CurrentCubeName="Adventure Works" SharedDataManagerName="localManager"
    		olapshared:DataSource.ConnectionString="datasource=localhost; initial catalog=adventure works dw">
    <!- Adding Elements to Categorical Axis -->
    		 <syncfusion:Dimension Name="Date" HierarchyName="Fiscal" LevelName="Fiscal Year" IncludeMembers="FY 2002, FY 2003"  />   <!- Multiple Members where specified by comma separate -->                 
    		 <syncfusion:Kpi Name="Revenue" ShowGoal="True" ShowStatus="True" ShowValue="True" ShowTrend="True" />
    <!- Adding Elements to Series Axis -->
    		 <syncfusion:Dimension Name="Sales Channel" HierarchyName="Sales Channel" LevelName="Sales Channel" />
    	     <syncfusion:Dimension Name="Product" HierarchyName="Product Model Lines" LevelName="Product Line" IncludeMembers="Road" />


    A sample demo is available at the following location.

    {system drive}:\Users\<User Name>\AppData\Local\Syncfusion\EssentialStudio\<Version Number>\WPF\OlapChart.WPF\Samples\Defining Reports\ XAML Configuration Demo