Hi Dan,
Greetings from syncfusion.
We have analyzed your query. From that, we would like to let you know that, we can achieve your requirement using “labelFormat” and “Interval” property in primaryXAxis of chart. Based on that we have prepared a sample for your reference. Please find the below sample and code snippet.
Code Snippet:
<EjsChart>
<ChartPrimaryXAxis LabelFormat="n0" Minimum="15" Maximum="19" Interval="1"></ChartPrimaryXAxis>
<ChartSeriesCollection>
<ChartSeries DataSource="@chartData" XName="xValue" YName="yValue1" Opacity="1" Name="Germany" Fill="#1e90ff" Width=2 Type="ChartSeriesType.Column">
</ChartSeries>
</ChartSeriesCollection>
</EjsChart>
@code{
public class DoubleData
{
public double xValue { get; set; }
public double yValue1 { get; set; }
public double yValue2 { get; set; }
}
public List<DoubleData> chartData = new List<DoubleData>
{
new DoubleData { xValue = 16, yValue1 = 2, yValue2= 7},
new DoubleData { xValue = 17, yValue1 = 7, yValue2 = 8 },
new DoubleData { xValue = 18, yValue1 = 10, yValue2 = 24 },
};
} |
Screenshot:
Note : Chart supports numeric value with double only.
Let us know if you have any concerns.
Regards
Srihari M