Visit Gigasoft's Web Site
ProEssentials v8 Help

Common Question 8

How do I change the color and line/point style of a subset?

Color is controlled with the SubsetColors property.


Line-Style is controlled with the SubsetLineTypes property.


Point-Style is controlled with the SubsetPointTypes property.


These properties are property arrays where the first index (0) corresponds to the first subset, the second index (1) corresponds to the second subset, and so on.


Within the demo and demo projects, see example 000. Also see PointColors for per point color control.

'//The following VB.NET example sets colors for three subsets //

Pego1.PeColor.SubsetColors(0) = Color.FromArgb(255,255,0,0)'(0) sets first subset

Pego1.PeColor.SubsetColors(1) = Color.FromArgb(255,0,255,0)'(1) sets second subset

Pego1.PeColor.SubsetColors(2) = Color.FromArgb(255,0,0,255)'(2) sets third subset


{The following Delphi example sets line styles for three subsets:}

Graph.SubsetLineTypes[0] := PELT_THINSOLID;{[0]index sets first subset}

Graph.SubsetLineTypes[1] := PELT_DASH; {[1]index sets second subset}

Graph.SubsetLineTypes[2] := PELT_DOT; {[2]index sets third subset}


//The following C/C++ example sets line styles for three subsets:

int nTmpStyles[3];

nTmpStyles[0] = PELT_THINSOLID;

nTmpStyles[1] = PELT_DASH;

nTmpStyles[2] = PELT_DOT;

PEvset(hPE, PEP_naSUBSETLINETYPES, nTmpStyles, 3);


//Note that this C example uses PEvset. It could have also used PEvsetcell like...

int nTmpStyle;


PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 0, &nTmpStyle);

nTmpStyle = PELT_DASH;

PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 1, &nTmpStyle);

nTmpStyle = PELT_DOT;

PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 2, &nTmpStyle);