Documentation menu
amcharts.getMeasureNameByIndex
webdatarocks.amcharts.getMeasureNameByIndex(rawData: Object, index: Integer): String
Returns the name of a specific measure from the data prepared for a chart. In chartData
and rawData
returned by amcharts.getData() the measures are ordered according to the order in the slice. The measures can be accessed by an index.
Example
Here is an example of how the series values of the column chart can be set using amcharts.getMeasureNameByIndex()
:
const series = chart.series.push(new am4charts.ColumnSeries());
series.dataFields.valueY = webdatarocks.amcharts.getMeasureNameByIndex(rawData, 0);