Dim C1Cha As C1.Win.C1Chart.C1Chart = Chart.BaseControl
\'
C1Cha.ChartGroups(0).ChartData.TrendsList.Clear \'清空之前的辅助线
\'
Dim tl As C1.Win.C1Chart.TrendLine = C1Cha.ChartGroups(0).ChartData.TrendsList.AddNewTrendLine()
tl.LineStyle.Color = Color.Gold \'
tl.LineStyle.Thickness = 2 \'
tl.LineStyle.Pattern = 0 \'
Dim zxb = New zxb柱状图标辅助线()
zxb.SetXY(New PointF( - 0.5, Tables("主表.明细").Current("X_中")), New PointF(t.Rows.Count, Tables("主表.明细").Current("X_中")))
另外注意辅助线的坐标值设置的值
此主题相关图片如下:1.png