Highcharts多个Y轴绘图带碰撞
Highcharts multiple yaxis plotband collision
我一直在尝试使用多个y轴的角度规。我使用了偏移轴属性来避免它们之间的碰撞。然而,轴线相互碰撞的情节带。是否有任何属性将它们分离或任何其他变通方法?
我的尝试:
$(function () {
$('#container').highcharts({
chart: {
type: 'gauge',
plotBackgroundColor: null,
plotBackgroundImage: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Speedometer'
},
pane: {
startAngle: -90,
endAngle: 90,
background: null
},
// the value axis
yAxis:[
{
min: 0,
max:100,
minorTickInterval: 'auto',
minorTickWidth: 1,
minorTickLength: 10,
minorTickPosition: 'inside',
minorTickColor: '#666',
labels: {
distance: 12,
rotation: 'auto'
},
offset: -30,
tickPixelInterval: 30,
tickWidth: 2,
tickPosition: 'inside',
tickLength: 10,
tickColor: '#666',
labels: {
step: 2,
rotation: 'auto'
},
plotBands: [{
from: 0,
to: 10,
color: '#55BF3B',
}, {
from: 10,
to: 70,
color: '#DDDF0D',
}, {
from: 70,
to: 90,
color: '#DF5353',
}]
},
{
min: 0,
max:100,
minorTickInterval: 'auto',
minorTickWidth: 1,
minorTickLength: 10,
minorTickPosition: 'inside',
minorTickColor: '#666',
labels: {
distance: 12,
rotation: 'auto'
},
offset: 30,
tickPixelInterval: 30,
tickWidth: 2,
tickPosition: 'inside',
tickLength: 10,
tickColor: '#666',
labels: {
step: 2,
rotation: 'auto'
},
plotBands: [{
from: 0,
to: 10,
color: 'red',
offset:30,// green
}, {
from: 10,
to: 70,
color: 'orange' // yellow
}, {
from: 70,
to: 90,
color: 'violet' // red
}]
}
],
series: [{
name: 'Speed',
data: [{
id: 'hour',
y: 90,
}],
},{
name: 'Speed',
data: [{
id: 'minute',
y: 50,
}],
},
]
},
// Add some life
function (chart) {
if (!chart.renderer.forExport) {
setInterval(function () {
}, 3000);
}
});
$('.highcharts-axis text').click(function(){ alert($(this).text());
});
});
https://jsfiddle.net/n1djkxLr/8/
此问题与know bug有关,在此处向我们的开发人员报告:https://github.com/highcharts/highcharts/issues/5283
相关文章:
- Canvas Html5绘图应用程序,移动画布会导致重大问题
- HTML画布在绘图后立即擦除矩形
- 如何在JS Leatflet绘图插件中获取圆的坐标
- 在一个页面中具有多个捕捉绘图和捕捉内容
- IE7-FIX下的总碰撞
- SVG手写字母绘图动画
- 绘图悬停文本未显示
- 逐像素碰撞检测弹球
- 为画布绘图添加鼠标事件
- 如何强制绘图将x轴编号显示为类别
- 绘图应用程序-单击工具更改光标
- 重置transform:rotate(),方法是移除并追加在追加和重绘图表后未显示数据的画布
- Highcharts多个Y轴绘图带碰撞
- 如何使用画布和javascript使绘图移动
- highcharts IE8重绘图表问题
- 砖块和球之间的碰撞检测(使用数字数组)
- OpenOffice绘图:增强的几何图形解析
- 为Phaser创建碰撞形状
- 如果谷歌地图绘图(如onDraw)触发什么事件
- Fabricjs在绘图时连接线条