Category / Section
How can we add multiple axis to OlapChart in OlapClient
1 min read
We can able to add multiple chart axis to OlapChart in OlapClient control. This can be achieved using the following code snippet.
C#
public MainPage() { InitializeComponent(); this.DataContext = new ViewModel.ViewModel(); this.olapClient.Loaded += olapClient_Loaded; } void olapClient_Loaded(object sender, System.Windows.RoutedEventArgs e) { this.olapClient.OlapChart.OnDataRefreshCompleted += new Syncfusion.Silverlight.Chart.Olap.OlapChart.DataRefreshCompleted(OlapChart_OnDataRefreshCompleted); } private void OlapChart_OnDataRefreshCompleted(object sender, Syncfusion.Silverlight.Chart.Olap.DataRefreshCompletedEventArgs e) { for (int i = 0; i < this.olapClient.OlapChart.OlapArea.Series.Count; i++) { this.olapClient.OlapChart.OlapArea.Series[i].YAxis = new Syncfusion.Windows.Chart.ChartAxis { Header = "Test", ShowGridLines = false, OpposedPosition = true, Orientation = Orientation.Vertical }; } }
Figure: OlapChart in OlapClient with multiple Chart Axis