1

This is the first time I use chart control in ASP.net

I did the binding between the chart and a datatable to show the stats of revenue per date

enter image description here

Although, When the selected dates are more than 9, the chart stops displaying them all on the X axis

It displays only 5

enter image description here

What is the reason? Any workaround?

Any help would be appreciated

VMAtm
  • 27,943
  • 17
  • 79
  • 125
HelpASisterOut
  • 3,085
  • 16
  • 45
  • 89

1 Answers1

1

Similar problem was found here, and people there recommends to set up some properties, like this:

Try setting the AxisX Interval property to 1

Chart1.ChartAreas[0].AxisX.Interval = 1

note that you may then also want to change the angle of the labels

And after that, as you'll get a lot of values at axis X, you should change the angle for them. like this:

Chart1.ChartAreas[0].AxisX.LabelStyle.Angle = 45

Note that Chart1 is a Id of your chart, and can be different.

Ashley Medway
  • 7,151
  • 7
  • 49
  • 71
VMAtm
  • 27,943
  • 17
  • 79
  • 125