Search code examples
phphighchartsyii2tooltip

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


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?


Solution

  • 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)