我正在使用 Ms Web Chart 来堆叠柱形图。如果列数 <= 9,则轴标签正确出现。如果超过 9,则标签无法正确出现。
for(int pointIndex = 0; pointIndex < 10; pointIndex++)
{
Chart1.Series["Series1"].Points.AddY(Math.Round((double)random.Next(45, 95),0));
Chart1.Series["Series2"].Points.AddY(Math.Round((double)random.Next(5, 75),0));
Chart1.Series["Series3"].Points.AddY(Math.Round((double)random.Next(5, 95), 0));
Chart1.Series["Series4"].Points.AddY(Math.Round((double)random.Next(35, 95), 0));
Chart1.Series["Series1"].Points[pointIndex].AxisLabel = "test" + pointIndex;
}
Chart1.Series["Series1"].ChartType = "StackedColumn";
Chart1.Series["Series2"].ChartType = "StackedColumn";
Chart1.Series["Series3"].ChartType = "StackedColumn";
Chart1.Series["Series4"].ChartType = "StackedColumn";
如果pointindex小于= 9,那么它会很好,如果它> 9,那么轴标签会正确出现