HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
JS
Highcharts.chart('container', {
title: {
text: 'X axis labels are disabled'
},
xAxis: {
labels: {
enabled: false
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, [enter link description here][1]194.1, 95.6, 54.4]
}]
});
http://jsfiddle.net/Kondaldurgam/jfg8w3f9/
在x轴上我想在系列名称中禁用,在阀名称中禁用y轴
答案 0 :(得分:0)
制作图例enable:false
和yAxis标题text:''
Highcharts.chart('container', {
title: {
text: 'X axis labels are disabled'
},
xAxis: {
labels: {
enabled: false
}
},
yAxis: {
title: {
text: ''
},
},
legend:{
enabled: false
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
答案 1 :(得分:0)
您可以通过设置labels:{enabled: false}
和title:{text:null}
来删除x和y轴的标签和值。同时通过在系列showInLegend: false,
中插入此图例来隐藏图表图例。
示例JS:
Highcharts.chart('container', {
title: {
text: 'X axis labels are disabled'
},
xAxis: {
labels:{enabled: false},
title: {
text: null
}
},
yAxis: {
labels:{enabled: false},
title: {
text: null
}
},
series: [{
showInLegend: false,
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});