1
votes

I cannot get the tooltip positioner function to work. It acts as if this function is not here at all and loads the tooltip like normal. The event function above it works. I have tried everything and cannot figure out why it is simply ignoring this. I can use any of the other properties of the tooltip like shadow but the positioner will not work. The chart draws with all my settings except the positioner setting.

This is echoed onto a page with php inside a domready mootools function.

    var chart_options = '.$chart_options.'
    chart_options.xAxis.events = {setExtremes:function (e){ChartSettings.load_zoom_data(e)}}
    chart_options.tooltip = {positioner: function () {return {x:10,y:30}}}

    window.chart = new Highcharts.StockChart(chart_options, function (chart){
        chart.addEvent("tooltipRefresh", function (){ChartSettings.set_hover_points(chart.hoverPoints)});
    });

Your help is greatly appreciated.

Here is an example of this working: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/tooltip/positioner/

The chart_options object

The chart_options object

1
Looks like it should work to me. But you should always terminate statements with semi-colons to make sure some unexpected interpretation of your code isn't occurring.JohnnyHK
@JohnnyHK - I know right!? That is what is driving nuts! Anyway, I went back through and added ';' for good measure but no dice. thanksstyks
Are there any errors throw in the javascript console? Have you made sure that the $chart_options variable from php is outputting a javascript object? Double check by putting 'console.log(chart_options);' (minus the single quotes) right after the declaration of the chart_options.Garrick Cheung
And I made the example work with MooTools 1.4.5: jsfiddle.net/n5pfQGarrick Cheung
@Garrick - All my other settings are working. No errors are being displayed in the console. I am going to update the code with a screen shot of the object generated.styks

1 Answers

1
votes

Turns out this was a real problem in the version of highstock I was using. I upgraded to the latest version and now it works. Thank you all for your help and direction.

The version it does not work in is v1.1.5.

thanks,