3
votes

When selecting the "All"-range in a HighStock chart with technical indicators then
the stock price (AAPL stock price) is not listed (most of the time, sometimes it appears) in the tooltip.

  • Open the sample chart here: http://jsfiddle.net/laff/SRfW6/
  • Hover over the chart and notice that the stock price is listed in the tooltip.
  • Click on the 'All' range selection.
  • Hover over the chart and notice that the stock price is no longer listed most of the time in the tooltip.

Has anybody an idea what the problem might be?

This the code from the example:

$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=?', function(data) {
    $(function() {
        $('#container').highcharts('StockChart', {

            title : {
                text : 'MACD of AAPL stock price'
            },

            subtitle: {
                text: 'From may 15, 2006 to May 10, 2013'
            },

            yAxis: [{
                title: {
                    text: 'Price'
                },
                height: 200,
                plotLines: [{
                    value: 0,
                    width: 1,
                    color: '#808080'
                }]
            }, {
                title: {
                    text: 'MACD'
                },
                top: 300,
                height: 100,
                offset: 0,
                lineWidth: 2
            }],

            tooltip: {
                crosshairs: true,
                shared: true
            },

            rangeSelector : {
                selected : 1
            },

            legend: {
                enabled: true,
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'middle',
                borderWidth: 0
            },

            plotOptions: {
                series: {
                    marker: {
                        enabled: false,
                    }
                }
            },

            series : [{
                name: 'AAPL Stock Price',
                type : 'line',
                id: 'primary',
                data : data
            }, {
                name : 'MACD',
                linkedTo: 'primary',
                yAxis: 1,
                showInLegend: true,
                type: 'trendline',
                algorithm: 'MACD'

            }, {
                name : 'Signal line',
                linkedTo: 'primary',
                yAxis: 1,
                showInLegend: true,
                type: 'trendline',
                algorithm: 'signalLine'

            }, {
                name: 'Histogram',
                linkedTo: 'primary',
                yAxis: 1,
                showInLegend: true,
                type: 'histogram'

            }]
        });
    });
});
1

1 Answers

0
votes

Just adding this code to plotOptions.series seems to fix it (JSFiddle demonstration):

dataGrouping: { }

It appears that given your original code dataGrouping was somehow null.

I'll be honest. I don't know why. Looks borderline buggy.