【发布时间】:2014-08-11 15:57:35
【问题描述】:
我在使用透明内容时遇到了一种奇怪的Highchart 缩放行为。
很难解释,所以我准备了a quick video to show it。
你有遇到过这样的问题吗?
提前致谢!
编辑:JSFiddle
还有代码:
$(function () {
$('#roadmap-training').highcharts({
chart: {
type: 'bar',
zoomType: 'y'
},
yAxis: {
type: 'datetime',
min: new Date(2014, 0, 1).getTime(),
max: new Date(2014, 11, 31).getTime(),
},
plotOptions: {
series: {
stacking: "normal"
},
},
tooltip: {
positioner: function () {
return { x: 10, y: 35 };
},
},
series: [
{
data: [
{
y: 864000000,
},
{
y: 12960000000,
}
]
},
{
data: [
{
y: new Date(2014, 1, 1).getTime(),
color: 'transparent'
},
{
y: new Date(2014, 8, 1).getTime(),
color: 'transparent'
}
]
}
]
});
});
这是我以这种方式生成的真实世界示例:
【问题讨论】:
-
很好的例子。是否可以在 JSFiddle 中获取您的代码以尝试一些解决方案?
标签: javascript jquery charts highcharts bar-chart