amcharts.getCategoryName(rawData: Object)
Returns the name of a field that represents a category in data for the chart. It is needed to set up the amCharts Category axis.
Parameter/Type | Description |
---|---|
rawData Object |
Raw data that contains the category (check out the structure of rawData in getData()). |
Returns a string, which is the name of a field representing a category in the chart's data.
Here is an example of setting the name for the amCharts Category axis:
var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
categoryAxis.dataFields.category = pivot.amcharts.getCategoryName(rawData);
amcharts.getData
amcharts.getMeasureNameByIndex
amcharts.getNumberOfMeasures
amcharts.getNumberFormatPattern