我正在尝试实现一个条形图,其 slider 覆盖在类似于下图的图表上 Bar chart with slider overlayed on chart .
是否有任何现有的 highstocks api 选项可供我利用来实现此行为?
注意:我尝试使用库存较多的导航器选项。但导航器选项有助于在图表下方显示 slider 。我想将其覆盖在图表本身上
最佳答案
您可以隐藏主图表并仅显示导航器:https://jsfiddle.net/bqhz2fwn/
我对你的 fiddle 所做的唯一更改是隐藏 xAxis 并使 yAxis 的高度为 0:
"xAxis": {
"categories": [
1996,
1997,
1998,
1999,
2000,
2001,
2002,
2003,
2004,
2005,
2006,
2007,
2008,
2009,
2010,
2011,
2012,
2013,
2014,
2015,
2016
],
lineWidth: 0,
tickLength: 0,
labels: {
enabled: false
}
},
yAxis: {
height: 0,
gridLineWidth: 0,
labels: {
enabled: false
}
},
然后增加导航器的高度以填充空间:
"navigator": {
height: 275,
关于javascript - Highstock 堆叠条形图, slider 覆盖在图表上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60565469/