How to correctly create function for formatter on PHP in Yii2 Highcharts extension

风格不统一 提交于 2019-12-12 03:32:58

问题


I have to display some special information when my mouse is over a concrete point in a chart that is provided by Highcharts. I am using the Highcharts extension for Yii2.

My Code

'tooltip' => [
               'enabled' => true,
               'footerFormat' => true,
               'formatter' => "js:function() {
                    return 'my special information';
                }"
             ],

The data that comes from controller is correct. However there is nothing different - tooltip is still the default

What am I doing wrong?


回答1:


Sorry. My bad. All is working fine. I just duplicate 'tooltip' option. And my tooltip that i want to use was override by tooltip that i forgot to remove from my code)



来源:https://stackoverflow.com/questions/35767575/how-to-correctly-create-function-for-formatter-on-php-in-yii2-highcharts-extensi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!