Can I use two different formatters for highchart tooltips?

后端 未结 3 1099
孤城傲影
孤城傲影 2020-12-10 03:09

I have a highcharts table with two data series that use named values. In my tooltips for one series, I want to reference a data point from the series. So the solution in thi

3条回答
  •  無奈伤痛
    2020-12-10 03:38

    Here's an example. The fiddle example is here:

    tooltip: {
                formatter: function () {
                    var s = '' + Highcharts.dateFormat('%A, %b %e, %Y', this.x) + '';
    
                    $.each(this.points, function () {
                        s += '
    1 USD = ' + this.y + ' EUR'; }); return s; } },

提交回复
热议问题