首页 > 解决方案 > 工具提示中的角度 Highchart 多个值

问题描述

我正在研究一个高图表。系列的数组如下所示:

graphData = [{name:"Thunder", data:[['11PM',3726],['5PM',2344]]},
             {name:"Hurricane", data:[['11PM',5736].['5PM',5244]]}]

对于工具提示,如果我将鼠标悬停在任何一条线上,比如说晚上 11 点,我想同时显示来自 Thunder 和 Hurricane 的数据。现在,它只显示来自相应图表线的数据。

tootlip:{
pointFormat: "{point.series.name}: {point.y:0f}"
}
series: this.graphData

建议?谢谢!

标签: angulartypescripthighcharts

解决方案


您需要启用共享工具提示:

    tooltip: {
        shared: true
    }

现场演示:http: //jsfiddle.net/BlackLabel/hpkLgjbs/

API 参考: https ://api.highcharts.com/highcharts/tooltip.shared


推荐阅读