在使用过程中,会遇到一些自定义的数据,比如tips内容等,在JS中获取自定义json数据如下使用
var chart = new Highcharts.Chart({ chart: { renderTo: 'container', defaultSeriesType: 'column' }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, tooltip: { formatter: function() { return this.point.test ; } }, plotOptions: { series: { allowPointSelect: false, events: { click: function (event) { alert(event.point.test); } } } }, series: [{ data: [ { y: 29.9, customdata: 'somevalue',test:'test' }, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }]});