Keys
This collection contains the legend keys represented by LayoutChartLegendKey objects. Access to collection items is possible both by name of data series and by number (the object ordinal number in the collection). Names of data series are retrieved from the field with labels (see the LayoutChartSettings::LabelField property) or generated automatically.
The order of items in the collection corresponds to the order of data series. When you change the number of data series, the collection is updated automatically. Thus, the number of legend keys in the collection always corresponds to the number of data series.