lakhaNamdhari
lakhaNamdhari

Reputation: 78

highcharts: shared tooltip not working for series with diffrent intervals

I am using two data Series in a column chart and plotting them on time axis. The interval for one data series is 1 year and other series is three months.

I am trying to use shared tooltip, however its been only shared for the first point on X-axis, after that tooltip only displays data for one series.

Is there any workaround to Fix it?

Upvotes: 0

Views: 1919

Answers (1)

crazycrv
crazycrv

Reputation: 2445

tooltip: {
            shared: true,
            formatter: function() {
                var p = '';
                p += '<b>' + Highcharts.dateFormat('%b %e, %Y, %H:%M',this.x) +'</b><br/>';
                $.each(this.points, function(i, series){
                    p +='<span style="color:' + this.series.color + '">' + this.series.name + '</span>: ' + Highcharts.numberFormat(this.y, 2) + ' kW<br/>'
                });

                return p;
            }
        }

Upvotes: 1

Related Questions