PHP - This is part of a Highchart configuration array that is returned by a PHP function (which is json_encoded)
'plotOptions' => array(
'pie' => array(
'allowPointSelect' => TRUE,
'cursor' => 'pointer',
'dataLabels' => array(
'enabled' => TRUE,
'color' => '#000000',
'connectorColor' => '#000000',
'formatter' => "function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %' }"
)
)
)
JavaScript - Accessing this information from the encoded data
container.highcharts(r.hc);
// r.hc is the array that contains the highchart information above
The problem I'm having is:
Uncaught TypeError: Object function() { return '<b>'+ this.point.name +'</b>: '+
this.percentage +' %' } has no method 'call'
How do I change this so it recognizes it as a function? Or is this even possible?