PHP - これは、PHP 関数 (json_encoded) によって返される Highchart 構成配列の一部です。
'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 - エンコードされたデータからこの情報にアクセスする
container.highcharts(r.hc);
// r.hc is the array that contains the highchart information above
私が抱えている問題は次のとおりです。
Uncaught TypeError: Object function() { return '<b>'+ this.point.name +'</b>: '+
this.percentage +' %' } has no method 'call'
これを関数として認識するように変更するにはどうすればよいですか? それともこれは可能ですか?