javascript - chart.scrollablePlotArea 意外行为
问题描述
我正在尝试在scrollBar
我的图表中添加一个,但它没有按预期工作。我很难让它出现。我找到的解决方案是从我的xAxis
chart.scrollablePlotArea
containerProps
react-component
containerProps={{
className: "chart",
style: {
height: "500px",
minWidth: "280px"
}
}}
随之scrollBar
出现了,但出现了一些意想不到的行为,首先是fullScreen
坏了(它开始出现黑条),其次是customButton
开始随着图表移动。我在exporting.buttons.contextButton
API上进行了搜索,但找不到任何属性来固定其位置。
这是一个工作演示,感谢任何帮助。
解决方案
我找到的解决方案是从我的 react-component 中删除 containerProps
scrollablePlotArea
在不删除 的情况下似乎可以正常工作containerProps
,但容器宽度必须小于 set scrollablePlotArea.minWidth
。
首先全屏坏了(它开始出现黑条)
这是一个已经修复的错误。下一个版本后将在 Highcharts npm 中提供。
https://github.com/highcharts/highcharts/issues/12832
第二个 customButton 开始随着图表移动
您是如何找到此功能的?API 中似乎customButton
不可用,这意味着不完全支持。
推荐阅读
- python - 如何在一个熊猫数据框列中搜索字符串作为另一个数据框列中的子字符串
- python - 使用 PyInstaller 构建的 PyQt5 应用程序不起作用
- algorithm - Rust 内置的 `sort` 使用什么排序算法?
- java - 使用 hashlib 或其他方法将 Java MD5 `java.security.MessageDigest.getInstance("MD5")` 代码转换为 Python2.7
- ios - 从反应本机上传图像到服务器有空的身体
- animation - 使用 setTransform(1,0,0,1,0,0) 与 save() restore()
- python - 获取数组的类型无效
, 必须是字符串或张量 - c - C - 大括号内的指针和双指针
- java - 将json字符串转换为列表
- 与杰克逊
- sql-server - 从 2 列中选择数据,都在 SQL Server 中另一行的范围内