I am using AmCharts in my AngularJs Application and I wanted to know how I could create custom balloon text when we hover over the category axis labels. The following is my code:
var configChart = function () {
employeeChart = new AmCharts.AmSerialChart();
employeeChart.categoryField = "empId";
var yAxis = new AmCharts.ValueAxis();
yAxis.position = "left";
employeeChart.addValueAxis(yAxis);
mcfBarGraph = new AmCharts.AmGraph();
mcfBarGraph.valueField = "employeeRating";
mcfBarGraph.type = "column";
mcfBarGraph.fillAlphas = 1;
mcfBarGraph.lineColor = "#f0ab00";
mcfBarGraph.valueAxis = yAxis;
employeeChart.addGraph(empBarGraph);
employeeChart.write('employee');
}
In my chart the category field is emp Id and the valueField is rating. The data provider for this chart is the employees json data. Now there is one more attribute in the JSON which is location. So I want to show "Location-Emp ID" when I over the category axis field on the chart.
Could you let me know how I could achieve this functionality.