我还是直接给出我的代码吧,关键是几个属性的设置:
- C1.Win.C1Chart.ValueLabelsCollection VlCol1 = C1WebChart1.ChartArea.AxisX.ValueLabels;
- VlCol1.Add(1, "第一组");
- VlCol1.Add(2, "第二组");
- VlCol1.Add(3, "第三组");
- VlCol1.Add(4, "第四组");
- VlCol1.Add(5, "第五组");
- VlCol1.Add(6, "第六组");
- VlCol1.Add(7, "第七组");
- VlCol1.Add(8, "第八组");
- VlCol1.Add(9, "第九组");
- C1WebChart1.ChartArea.AxisX.AnnoMethod = AnnotationMethodEnum.ValueLabels;
- C1WebChart1.ChartArea.AxisX.Max = 10;
- C1WebChart1.ChartArea.AxisX.Min = 0.5;
- C1.Win.C1Chart.ValueLabelsCollection VlRow1 = C1WebChart1.ChartArea.AxisY.ValueLabels;
- VlRow1.Add(1, "10");
- VlRow1.Add(2, "100");
- VlRow1.Add(3, "500");
- VlRow1.Add(4, "1000");
- VlRow1.Add(5, "5000");
- VlRow1.Add(6, "10000");
- C1WebChart1.ChartArea.AxisY.Min = 0;
- C1WebChart1.ChartArea.AxisY.Max = 10000;
复制代码 |