应该是这段代码的原因,ClearValueLabel对非常规的用法可能不起作用的,
Dim c1Chart1 = Chart.basecontrol
Dim lbls = c1Chart1.ChartLabels
For i As Integer = 0 To Tables(s).rows.count-1
Dim lbl As C1.Win.C1Chart.Label = lbls.LabelsCollection.AddNewLabel()
lbl.Text = Format(series.y(i), "0.00%")
lbl.AttachMethod = C1.Win.C1Chart.AttachMethodEnum.DataIndex
lbl.AttachMethodData.GroupIndex = 0
lbl.AttachMethodData.SeriesIndex = 0
lbl.AttachMethodData.PointIndex = i
lbl.Style.ForeColor = Color.white
lbl.Style.backcolor= Color.green
lbl.style.font = new font("宋体", 10)
'' lbl.Compass = LabelCompassEnum.east
lbl.Visible = True
Next
按钮2试试
Dim c1Chart1 = Chart.basecontrol
Dim lbls = c1Chart1.ChartLabels
lbls.LabelsCollection.Clear()
Chart.AxisX.ClearValueLabel()
Chart.AxisY.ClearValueLabel()
Chart.ChartType = ChartTypeEnum.Pie '图表1类型改为Bar(条形)