https://jsfiddle.net/Kondaldurgam/7kLkh7ya/8/
我想只显示x和y轴的栅格,但我没有x和y轴的任何数据,没有数据也可以显示
$(function() {
Highcharts.chart('container', {
chart: {
type: 'bubble',
plotBorderWidth: 1,
zoomType: 'xyz'
},
legend: {
enabled: false
},
credits: {
enabled: false
},
title: {
text: 'Using X Y Z Coordinates'
},
xAxis: {
type: "category",
gridLineWidth: 1
},
yAxis: {
startOnTick: false,
endOnTick: true,
title: {
text: ''
},
},
});
});发布于 2017-02-18 15:56:11
也许这会对你有帮助..在其中使用此逻辑..fiddler
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
ignoreHiddenSeries : false
},
xAxis: {
},
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]
}, {
data: [129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4]
}]
});
// the button action
var series = chart.series[0];
series.hide();
series = chart.series[1];
series.hide();
});发布于 2017-02-20 05:55:29
如果没有数据,则需要将axis.showEmpty设置为true,并设置axis min/max。您还需要至少一个系列-它可能没有数据。
Highcharts.chart('container', {
chart: {
type: 'bubble',
plotBorderWidth: 1,
zoomType: 'xyz'
},
legend: {
enabled: false
},
credits: {
enabled: false
},
title: {
text: 'Using X Y Z Coordinates'
},
xAxis: {
type: "category",
gridLineWidth: 1,
showEmpty: true,
min: 0,
max: 10
},
yAxis: {
startOnTick: false,
endOnTick: true,
showEmpty: true,
title: {
text: ''
},
min: 0,
max: 10
},
series: [{}]
});https://stackoverflow.com/questions/42312200
复制相似问题