Hi Herbert,
Thanks for using Syncfusion products.
We would like to let you know that the behavior of
CategoryAxis, especially with your scenario. CategoryAxis is a string type
axis, in which the axis labels are based on first series (Series [0]) or series
with maximum number of data points (to cover all the datapoints of other
series). However your requirement can be achieved by adding separate axis
(Series.XAxis) to the series in order to display the corresponding axis labels
or using NumericalAxis instead of CategoryAxis or using ChartColumnDefinitions
to setting corresponding axis for the series at specified index as shown in the
below code snippet.
Code Snippet [Xaml]:
<chart:SfChart.ColumnDefinitions>
<chart:ChartColumnDefinition/>
<chart:ChartColumnDefinition/>
</chart:SfChart.ColumnDefinitions>
<chart:ColumnSeries.XAxis>
<chart:CategoryAxis chart:SfChart.Column="1"/>
</chart:ColumnSeries.XAxis>
We have also prepared sample based on this, please find the
sample from the following location.
Sample: AxisLabel.zip
Regarding the ChartColumnDefinitions you can also refer our
help documentation.
Ug link: http://help.syncfusion.com/ug/wpf/documents/area.htm
Please let us know if you require further assistance.
Regards,
Suresh S
Hi Herbert,
Thanks for your response.
As we informed earlier CategoryAxis in a string type axis
and data points (axis label) will be plotted based on index position and not a
linear. In order to display the data points in linear, we can use
NumericalAxis. We have prepared the
sample based on your requirement by using numerical axis instead of
ChartColumnDefinition and please
download from below location.
Sample: AxisLabel.zip
Please let us know if you require any further assistance.
Regards,
Suresh S
Hi Herbert,
Thanks for your response.
At present we haven’t support to plot category axis in
linear as per your requirement. We have considered this as feature and we will
implement this feature in any of our upcoming volume releases.
Please let us know if you have any query
Regards,
Suresh S
Hi Herbert,
We have tried to achieve your requirement by using numerical axis with custom labels as
shown in below code snippet.
Code Snippet[xaml]:
<chart:NumericalAxis>
<chart:NumericalAxis.CustomLabels>
<chart:ChartAxisLabel Position="1" LabelContent="peter"/>
<chart:ChartAxisLabel Position="2" LabelContent="robert"/>
<chart:ChartAxisLabel Position="3" LabelContent="anna"/>
<chart:ChartAxisLabel Position="4" LabelContent="julie"/>
</chart:NumericalAxis.CustomLabels>
</chart:NumericalAxis>
Also we have modified the sample based on it, please download
it from below location.
Please let us know if need any further assistance on this.
Thanks,
Suresh S