在Proessentials控件中,可以按照用户的喜好自定义图表子集的颜色和线条以及点的风格。
颜色是由SubsetColors属性控制的。
线条风格是由SubsetLineTypes属性控制的。
点风格是由SubsetPointTypes属性控制的。
第一个指数(0)对应于第一子集,第二个指数(1)对应于第二子集,以此类推。
示例代码如下:
'//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; nTmpStyle = PELT_THINSOLID; PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 0, &nTmpStyle); nTmpStyle = PELT_DASH; PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 1, &nTmpStyle); nTmpStyle = PELT_DOT; PEvsetcell(hPE, PEP_naSUBSETLINETYPES, 2, &nTmpStyle);