Category / Section
How to show or hide the Grid Lines in the OlapChart
We can able to show/hide the Grid lines in the OlapChart by using “ShowGridLines” property of Primary axis.
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.Loaded += OlapChart_Loaded;
}
void OlapChart_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
this.olapClient.OlapChart.OlapArea.PrimaryAxis.Loaded += PrimaryAxis_Loaded;
}
void PrimaryAxis_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
this.olapClient.OlapChart.OlapArea.PrimaryAxis.ShowGridLines = false;
this.olapClient.OlapChart.OlapArea.SecondaryAxis.ShowGridLines = false;
}

Figure: OlapChart without Grid Line for Primary and Secondary Axis