Hi Sascha,
Greetings from Syncfusion.
We have analyzed your requirement and we have prepared a sample based on that. We have updated the axis with already defined axis in resource as per the below code snippet.
Code snippet
<Grid.Resources>
<chart:NumericalAxis x:Key="numerical"/>
<chart:CategoryAxis x:Key="category"/>
<chart:LogarithmicAxis x:Key="log"/>
</Grid.Resources>
|
private void Button_Click(object sender, RoutedEventArgs e)
{
if(chart.SecondaryAxis is LogarithmicAxis)
chart.SecondaryAxis = grid.Resources["numerical"] as RangeAxisBase;
else
chart.SecondaryAxis = grid.Resources["log"] as RangeAxisBase;
} |
You can axis with series as per the below code snippet.
Code snippet
private void Button_Click_1(object sender, RoutedEventArgs e)
{
FastColumnBitmapSeries series = new FastColumnBitmapSeries();
series.XBindingPath = "XValue";
series.YBindingPath = "YValue";
series.ItemsSource = viewModel.Data;
series.YAxis = new NumericalAxis();
chart.Series.Add(series);
} |
Please refer below user documentation for more details about axis types and customization.
Please let us know if you have any queries.
Regards,
Muneesh Kumar G.