legend: {
align: 'right',
x: -70,
verticalAlign: 'top',
y: 20,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false
},
加这个可以设置图例的位置,如果不想显示,则像下面这样写即可:
legend: {
enabled: false
}
要给图表加点击事件,例如点某个柱形图,然后做某些动作,可以这样写:
plotOptions: {
series: {
lineWidth: 1,
point: {
events: {
'click': function() {
if (this.series.data.length > 1) this.remove();
}
}
}
}
}