ITChart.IsFreeSeriesColor
ITChart

function IsFreeSeriesColor(AColor: OLE_COLOR; CheckBackgroundColor: WordBool): WordBool;

Type Library
TeeChartx

Description
The IsFreeSeriesColor returns whether the AColor parameter is used by any Series or not. The CheckBackGround parameter controls if AColor will be checked against the Chart.Panel.BackWallColor or not.

IsFreeSeriesColor Example

This code sets the MySeries1.Color to the clBlue color only if clBlue is not used by any other Series or the Chart.Panel.BackWallColor:

Example [Visual Basic]:

If TChart1.IsFreeSeriesColor(vbGreen, True) Then

TChart1.Series(0).Color = vbGreen

End If