angularjs - Creating custom balloon text for category Axis in AmCharts -


i using amcharts in angularjs application , wanted know how create custom balloon text when hover on category axis labels. following 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 chart category field emp id , valuefield rating. data provider chart employees json data. there 1 more attribute in json location. want show "location-emp id" when on category axis field on chart.

could let me know how achieve functionality.

this seems similar another question asked.

for balloon on categoryaxis label, want set chartcursor chart , set categoryballoonfunction on object:

var chartcursor = new amcharts.chartcursor(); chartcursor.categoryballoonfunction = function(category) {   return location + "-" + category;  };  employeechart.addchartcursor(chartcursor); 

how resolve location variable in angular you. if can provide mvce in form of fidddle or codepen reproduces scenario, take lot of guesswork out of how approach situation.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -