We have tried to create the SfChart with equal number of labels in xaxis and yaxis. But we could not plot the data’s with equal number of labels (Tick interval labels). The data points provided as ItemsSource will be dynamic data, so we cannot set the interval property for NumericAxis based on the Minimum and Maximum value of NumericAxis. The same data in UWP Toolkit chart displays equal number of labels in x and y axis. Can you please help me out on this.
Note: Already I have tried to use the MaximumLabels property also.
Data Values
"MinX": 0.0,
"MinY": 0.0,
"MaxX": 400,
"MaxY": 400
"DataPoints": [
{
"ChartX": 10.0,
"ChartY": 10.0
},
{
" ChartX ": 50.0,
" ChartY ": 50.0
},
{
" ChartX ": 75.0,
" ChartY ": 75.0
},
{
" ChartX ": 75.0,
" ChartY ": 75.0
},
{
" ChartX ": 100.0,
" ChartY ": 100.0
},
{
" ChartX ": 200.0,
" ChartY ": 200.0
}
]
XAML
<syncfusion:SfChart
x:Name="Chart"
Width="250"
Height="250"
HorizontalAlignment="Left"
VerticalAlignment="Top"
AreaBorderThickness="0">
<syncfusion:SfChart.PrimaryAxis>
<syncfusion:NumericalAxis
Minimum="{Binding MinX}"
Maximum="{Binding MaxX}"
ShowGridLines="False" />
</syncfusion:SfChart.PrimaryAxis>
<syncfusion:SfChart.SecondaryAxis>
<syncfusion:NumericalAxis
ShowGridLines="False"
Minimum="{Binding MinY}"
Maximum="{Binding MaxY}"
RangePadding="Round"/>
</syncfusion:SfChart.SecondaryAxis>
<syncfusion:SplineSeries
x:Name="series"
Interior="Black"
XBindingPath="ChartX"
YBindingPath="ChartY"
StrokeThickness="1"
ItemsSource="{Binding DataPoints}">
<syncfusion:SplineSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo
SymbolStroke="Black"
SymbolInterior="Black"
SymbolWidth="5"
SymbolHeight="5"
Symbol="Ellipse"></syncfusion:ChartAdornmentInfo>
</syncfusion:SplineSeries.AdornmentsInfo>
</syncfusion:SplineSeries>
</syncfusion:SfChart>How to show equal number of labels in x and y axis in SfChart
<syncfusion:SfChart Grid.Row="1"
..
AreaBorderThickness="0">
<syncfusion:SfChart.PrimaryAxis>
<syncfusion:NumericalAxis MaximumLabels="6"
..
</syncfusion:SfChart.PrimaryAxis>
<syncfusion:SfChart.SecondaryAxis>
<syncfusion:NumericalAxis MaximumLabels="3"
..
</syncfusion:SfChart.SecondaryAxis> |