DevExpress SpreadSheetControl Chart 设置线条颜色/样式

DevExpress SpreadSheetControl Chart set line color /style

DevExpress 网站无法告诉我。如何影响创建图形的线条颜色、粗细等?

Dim chart As Chart = myworb.Worksheets(1).Charts.Add(Charts.ChartType.ScatterLine)
chart.TopLeftCell = myworb.Worksheets(1).Cells("A83")
chart.BottomRightCell = myworb.Worksheets(1).Cells("F112")
chart.PlotArea.Fill.SetNoFill()

chart.Series.Add(myworb.Worksheets(1)("A1:A71"), myworb.Worksheets(1)("B1:B71"))
chart.Series.Add(myworb.Worksheets(1)("D1:D81"), myworb.Worksheets(1)("E1:E81"))
chart.Series.Add(myworb.Worksheets(1)("G1:G81"), myworb.Worksheets(1)("H1:H81"))
chart.Series.Add(myworb.Worksheets(1)("J1:J71"), myworb.Worksheets(1)("K1:K71"))
chart.Series.Add(myworb.Worksheets(1)("M1:M66"), myworb.Worksheets(1)("N1:N66"))

chart.Title.Visible = False
Dim axisX = chart.PrimaryAxes(0)
axisX.MajorTickMarks = AxisTickMarks.None
axisX.Scaling.AutoMax = False
axisX.Scaling.AutoMin = False
axisX.Scaling.Max = maxX1
axisX.Scaling.Min = minX1

Dim axisY = chart.PrimaryAxes(1)
axisY.MajorTickMarks = AxisTickMarks.None
axisY.Scaling.AutoMax = False
axisY.Scaling.AutoMin = False
axisY.Scaling.Max = maxY1
axisY.Scaling.Min = minY1

通常我会创建一个 Excel 文件作为模板,将其加载到控件中,然后填充图表作为一个系列使用的值。但是因为 Excel 自动缩放不起作用,所以我必须手动缩放它,所以我必须从头开始创建整个图表。我无法找到有关如何以编程方式在图表中设置颜色等的信息。非常感谢任何帮助。

"lines" 是图表系列,可以在 Series property. From there you can change various things about the series including the color. Alternatively you can custom draw series yourself using the CustomDrawSeries 活动中访问。

可以使用ShapeFormat.Outline property of your series objects. Call to ShapeOutlineFill.SetSolidFill method to set the color of your line and use the ShapeOutline.Width 属性设置线宽来设置颜色和粗细
这是示例:

chart.Series(5).Outline.SetSolidFill(Color.Magenta)
chart.Series(5).Outline.Width = 20