Javascript 多Y轴海图中的重叠Y轴
我正在尝试添加多个yaxis highstock。打印工作正常,但轴标签重叠&总体上看起来很笨拙。这是它的快照! 我已使用创建多y图表 你能帮忙吗 这些是我当前使用的格式选项Javascript 多Y轴海图中的重叠Y轴,javascript,charts,highcharts,highstock,Javascript,Charts,Highcharts,Highstock,我正在尝试添加多个yaxis highstock。打印工作正常,但轴标签重叠&总体上看起来很笨拙。这是它的快照! 我已使用创建多y图表 你能帮忙吗 这些是我当前使用的格式选项 var options = {}; options.xAxis = { labels : { enabled : true } }; options.title = { text : "Highchart", sty
var options = {};
options.xAxis = {
labels : {
enabled : true
}
};
options.title = {
text : "Highchart",
style: {
fontSize: '14px',
fontWeight: '800'
}
};
options.subtitle = {
text : ""
};
options.chart = {
borderColor : '#BBBBBB',
borderWidth : 0,
borderRadius : 20,
zoomType : 'xy'
};
// options.yAxis={min:0};
options.yAxis=[{ // Transaction Count_URL
labels: {
formatter: function() {
var value= this.value;
if(value>=1000000000)
ret = (value / 1000000000) + 'G'
else if(value>=1000000)
ret = (value / 1000000) + 'M';
else if(value>=1000)
ret = (value / 1000) + 'k';
else
ret=value;
return ret;
},
style: {
color: '#89A54E'
}
},
title: {
text: 'Memory Used',
style: {
color: '#89A54E'
}
},
opposite: true
}, { // Transaction count_EXEC
gridLineWidth: 0,
title: {
text: 'GC Count',
style: {
color: '#4572A7'
}
},
labels: {
formatter: function() {
return this.value;
},
style: {
color: '#4572A7'
}
}
}, { // Tertiary yAxis
gridLineWidth: 0,
title: {
text: 'TPS',
style: {
color: '#AA4643'
}
},
labels: {
formatter: function() {
return this.value;
},
style: {
color: '#AA4643'
}
},
opposite: true
}],
options.navigator=
{
enabled: false
};
options.credits = {
enabled : false
};
options.xAxis = {
type : 'datetime'
};
options.series = [];
options.rangeSelector = {
enabled : false
};
options.series=[];
options.tooltip = {
shared : false,
snap : 0
};
options.scrollbar = {
enabled : false
};
options.navigation = {
buttonOptions : {
enabled : false
}
};
您可以为yAxis设置偏移参数我也有同样的问题,但在我的例子中,右边没有太多空间。由于图形上的
溢出:hidden
,标签被隐藏。有什么解决方案吗?@RahulSagore您能在jsfiddle.net上以实时演示的形式重新创建您的示例吗?这将允许我检查图表的配置,并找到问题的原因。谢谢。我弄明白了为什么会重叠。图表具有配置图表:{marginRight:20,marginLeft:78}
。删除了那个。解决了这个问题。