Haider Ali
Haider Ali

Reputation: 2795

Microsoft Column/Bar Chart is not working correctly if there is more than 9 bars/Columns in chart

Edit :

I recognized that if there is less than or equal 9 bars, everything is working good. But if there is more than 9 bars in chart, labels started to print alternatively. Anyone has any workaround for this issue ?

Edit : This is the same behavior with Winform Chart control. This is a bug in Microsoft Chart control.

I am working on C# 4.5 win form application with RDLC report. I have added a bar chart to my report. That looks like enter image description here

I set bar width = 10 in custom attributes. But there is no property to set distance between bars.

My problem is, if in report more bars will added then rdlc report shows x axis labels alternatively, please check the screen shot.The yellow highlighted text is missing

I want to fix this issue. It is happening because there is no much room to add more bars. But I don't know why labels are going to be hidden.

Upvotes: 0

Views: 944

Answers (1)

Tamwe
Tamwe

Reputation: 359

Try setting the x-axis interval property to 1:

chart1.ChartAreas[0].AxisX.Interval = 1;

In a column chart, the x-axis is the horizontal axis. In a bar chart, the x-axis is the vertical axis.

Upvotes: 1

Related Questions