高图可隐藏小图表的上下文菜单 [英] highcharts context menu hidden for small charts

查看:181
本文介绍了高图可隐藏小图表的上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将信息中心类型的屏幕迁移至高图,并且希望使用默认的上下文菜单(用于导出各种图像格式和打印图表)。

问题是,很多这些图表都是小型图表,并且当图表低于某个特定值时,上下文菜单被隐藏大小,主要是因为上下文菜单出现在小图表大小的按钮上方。



是否有任何情况使上下文菜单总是出现在按钮下方?我知道我可以限制选项,这将解决问题,但我最好喜欢使用默认选项列表。另外,我并不是真的想要计算头寸并自己动手。



参见 jsfiddle

 查看jsfiddle的代码

解决方案

将以下样式添加到上下文菜单中。

  .highcharts-contextmenu {
bottom:auto!important;
top:5px;
}

FIDDLE


I am migrating a dashboard type screen to highcharts and would like to use the default context menu (for exporting various image formats and printing the chart).

The problem is that a lot of these charts are small gauge type charts and the context menu gets hidden when charts get below a certain size, mainly due to the fact that the context menu appears above the button for small charts size.

Is there anyway to make the context menu always appear below the button? I know I can limit the options and this will solve the problem but I would ideally like to use the default options list. Also I don't really want to have to calculate positions and move it myself.

See jsfiddle

see code at jsfiddle

解决方案

Add the following styles to the context menu.

.highcharts-contextmenu {
    bottom: auto !important;
    top: 5px;
}

FIDDLE

这篇关于高图可隐藏小图表的上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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