amcharts.getMeasureNameByIndex(rawData: Object, index: Number)
Returns the name of a measure with the specified index from data for the chart. Use
amcharts.getMeasureNameByIndex() to set up the amCharts Value axis.
amcharts.getMeasureNameByIndex() has the following parameters:
rawData– Object. The raw data that contains the measure name (check out the structure of
rawDatain getData()). The measures in
rawDatahave the same order as in the slice.
index– Number. The index of the measure to get.
Returns a string representing the name of a measure with the given index.
Here is an example of specifying the amCharts Value axis:
var series = chart.series.push(new am4charts.PieSeries());
series.dataFields.value = pivot.amcharts.getMeasureNameByIndex(rawData, 0);