Why does MS Chart only display X-axis labels for some data points?

When I bind data to barchart. I can not see the labels on the X axis for some bars. For example: I bind four data to a chart. Only the 2nd and 4th data labels are displayed on the chart.

+4
source share
1 answer

According to http://msdn.microsoft.com/fr-fr/library/system.web.ui.datavisualization.charting.axis.interval.aspx you can try something like:

myArea.AxisX.Interval = 1;

where myArea is your main ChartArea

NB: "The Interval property for the main label, grid line, or axis label takes precedence over the parameter of the Interval property of the Axis object.

+4
source

Source: https://habr.com/ru/post/1444078/


All Articles