加载图表时显示HighCharts工具提示 [英] Show HighCharts tooltip when chart loads

查看:464
本文介绍了加载图表时显示HighCharts工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我唱Highcharts以显示数年的保费金额。当用户在图表区域悬停时,我正在显示十字线和工具提示。但是,我想在最初加载图表时显示此内容(不包括移动鼠标前)。有没有办法做到这一点?使粘滞工具提示,我使用下面的代码和它的作品(IE8除外)。 Simillarly,希望在加载时显示它。

  chart.tooltip.hide = function(){}; 


解决方案

刷新工具提示时,显示加载时的工具提示

  chart.tooltip.refresh(chart.series [1] .points [2]); 

//如果tooltip.shared = true,则该参数是点数组
chart.tooltip.refresh([chart.series [1] .points [2]]);

在Load @ jsFiddle上显示工具提示



阅读更多@ 自定义Highcharts - 工具提示可见性


I am sing Highcharts to show years against premium amount of loan. I am showing a crosshair and tooltip when user hovers on chart area. However, I want to show this when the chart loads initially (without / before moving mouse). Is there any way to do this? to make the tooltip sticky, I used below code and it works (except IE8). Simillarly, looking for displaying it on load.

chart.tooltip.hide = function () { };

解决方案

Refresh the tooltip with the point at which you wish to show the tooltip at load

chart.tooltip.refresh(chart.series[1].points[2]);

// If the tooltip.shared=true, the parameter is array of points
chart.tooltip.refresh([chart.series[1].points[2]]); 

Show Tooltip on Load @ jsFiddle

Read More @ Customizing Highcharts - Tooltip Visibility

这篇关于加载图表时显示HighCharts工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆