ChartArea.FindAllObjects
method · ChartArea · cAlgo.API
DesktopCLICloud
Finds all the chart objects of the specified type.
Overloads
FindAllObjects()
Finds all the chart objects of the specified type.
T[] FindAllObjects()
chartArea.FindAllObjects() -> list[T]
Returns T[] — T[].
Examples
foreach (var line in Chart.FindAllObjects<ChartHorizontalLine>())
Print("Horizontal line {0} at {1}", line.Name, line.Y);
# Not available in Python: generic type arguments cannot be passed, use FindAllObjects(ChartObjectType) instead
for line in api.Chart.FindAllObjects(ChartObjectType.HorizontalLine):
api.Print(f"Horizontal line {line.Name}")
FindAllObjects(ChartObjectType objectType)
Finds all the chart objects of the specified type.
ChartObject[] FindAllObjects(ChartObjectType objectType)
chartArea.FindAllObjects(objectType: ChartObjectType) -> list[ChartObject]
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
objectType | ChartObjectType | ChartObjectType | Type of the object. |
Returns ChartObject[] — ChartObject[].
Examples
var trendLines = Chart.FindAllObjects(ChartObjectType.TrendLine);
Print("Trend lines on the chart: {0}", trendLines.Length);
trendLines = api.Chart.FindAllObjects(ChartObjectType.TrendLine)
api.Print(f"Trend lines on the chart: {trendLines.Length}")