amcharts.getCategoryName

webdatarocks.amcharts.getCategoryName(rawData: Object): String

Returns the name of the field that represents a category in the data prepared for a chart. 

Note that unless a caption is defined in data types settings, the field’s uniqueName is returned.

Examples

  1. Here is an example of how the name of the category axis can be set:
    var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
    
    categoryAxis.dataFields.category = pivot.amcharts.getCategoryName(rawData);

See also