大家好,非常感谢您的支持,我有以下代码的高图,一切正常,但有两个类别,我只想显示一个,但我想将其数据保存在工具提示中,所以有什么方法可以隐藏第一类,并显示其中之一。我还在代码中评论了我想要的内容。任何帮助将不胜感激。感谢
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: "container",
type: "line",
borderWidth: 5,
borderColor: '#e8eaeb',
borderRadius: 0,
backgroundColor: '#f7f7f7'
},
title: {
style: {
'fontSize': '1em'
},
useHTML: true,
x: -27,
y: 8,
text: '<span class="chart-title"> Grouped categories <span class="chart-href"> <a href="http://www.blacklabel.pl/highcharts" target="_blank"> Black Label </a> </span> <span class="chart-subtitle">plugin by </span></span>'
},
series: [{
name:"Low",
data: [4, 14, 18, 5, 6, 5, 14, 15, 18]
}],
xAxis: {
categories: [{
name: "20",//should not hide this
categories: ["21", "22", "23","24"],
// I want to do hide this categories:["21", "22", "23","24"]
}, {
name: "25", //should not hide this
categories: ["26", "27", "28","29"]
// I want to do hide this categories:["26", "27", "28","29"]
}, {
name: "30",// //should not hide this
categories: ["31", "32", "33","34"]
// I want to do hide this categories:["31", "32", "33","34"]
}]
}
});
});