ui.Chart.setSeriesNames

Stay organized with collections Save and categorize content based on your preferences.

Returns a copy of this chart with updated series names.

UsageReturns
Chart.setSeriesNames(seriesNames, seriesIndex)ui.Chart
ArgumentTypeDetails
this: ui.chartui.ChartThe ui.Chart instance.
seriesNamesDictionary|DictionaryNew series names. If it's a string, the name of the series at seriesIndex is set to seriesNames. If it's a list, the value at index i in the list is used as a label for series number i. If it's a dictionary or an object, it's treated as a map from existing series names to new series names. In the last two cases, seriesIndex is ignored.
seriesIndexNumber, optionalThe index of the series to rename. Ignored if seriesNames is a list or dictionary. Series are 0-indexed.