i am using LiveChart
and loading some data.
<wpf:CartesianChart Name="LineChart" LegendLocation="top" >
<wpf:CartesianChart.AxisY>
<wpf:Axis Title="Sales" ></wpf:Axis>
</wpf:CartesianChart.AxisY>
<wpf:CartesianChart.AxisX>
<wpf:AxesCollection>
<wpf:Axis Labels="{Binding Labels}">
<wpf:Axis.Separator>
<wpf:Separator Step="1" />
</wpf:Axis.Separator>
</wpf:Axis>
</wpf:AxesCollection>
</wpf:CartesianChart.AxisX>
while on backend i have defined Labels.
public DailySalesProgressLineChart()
{
InitializeComponent();
Labels = new[]
{
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30
};
DataContext = this;
LoadLineChart();
}
SeriesCollection seriesCollection = new SeriesCollection();
public int[] Labels { get; set; }
but i am not seeing all 30 Labels
on x-axis
. I have referred to these solutions but still same problem.
Livecharts not displaying Label on x axis in WPF
https://github.com/Live-Charts/Live-Charts/issues/481