[英]I want gird lines of x-axis and y-axis in highcharts but i don't want x-axis value and y-axis value
https://jsfiddle.net/Kondaldurgam/7kLkh7ya/8/ https://jsfiddle.net/Kondaldurgam/7kLkh7ya/8/
i want show gridines only x and y axis but but i don't have any data of x and y axis its possible to showing without data 我想显示网格只有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: ''
},
},
});
});
May be this will help you.. use this logic in it.. fiddler 可能这会帮助你..在它中使用这个逻辑.. 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();
});
If you have no data, you need to set axis.showEmpty
to true and set axis min/max. 如果没有数据,则需要将axis.showEmpty
设置为true并设置轴min / max。 You also need at least one series - it might be without data. 您还需要至少一个系列 - 它可能没有数据。
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: [{}]
});
example: https://jsfiddle.net/7kLkh7ya/9/ 示例: https : //jsfiddle.net/7kLkh7ya/9/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.