GraphSetDataSeriesColors method (WinStudio scripts)

注意: This topic applies to the graphing tool, which is supported for backward compatibility.  We recommend that, if you want to add charts or gauges to a form, use the newer FusionCharts tool instead. See About charts and gauges.

Applies To

IWSFormComponent interface, graph objects

Definition

Sets the color scheme for the data series.

Syntax

object.GraphSetDataSeriesColors( colorList )

  Part   Description
object Required. A reference to a valid graph component object.
colorList Required. Of the class System.Collections.Generic.List(Of String).

Remarks

Colors are defined in RGB (Red,Green,Blue) string format. The system accepts numbers in the range 0-255 for each RGB value.

If an invalid RGB string value is given, the system ignores the color specification.

The system interprets an empty string as an RGB value of  0,0,0.

Example

Dim seriesColors As System.Collections.Generic.List(Of String) = _
   New System.Collections.Generic.List(Of String)
seriesColors.Add("255,0,0")    ' Red
seriesColors.Add("255,255,0")  ' Yellow
seriesColors.Add("0,0,255")    ' Blue
ThisForm.Components("graph1").GraphSetDataSeriesColors( seriesColors )
ThisForm.Components("graph1").GraphDraw()