这是我的HighCharts代码:
var myChart = Highcharts.chart('elevations', {
chart: {type: 'area', backgroundColor: '#ffffff', width: 1000},
title: { text: '' },
tooltip: {
backgroundColor: '#FCFFC5',
borderColor: '#5e88ff', borderWidth: 2,
useHTML: true,
headerFormat: '<table><tr><td>bei Kilometer:</td><td style="text-align: right"><b>{point.key}</b></td></tr>',
pointFormat: '<tr><td style="color:{series.color}">{series.name}: </td>' +
'<td style="text-align: right"><b>{point.y}</b></td></tr>',
footerFormat: '</table>',
valueDecimals: 1
},
xAxis: { categories: distNew },
yAxis: { title: { text: 'Meter' }, lineColor: '#5e88ff', lineWidth: 2 },
series: [{
name: 'Höhenmeter',
data: elevations,
showInLegend: false,
lineWidth: 2,
color: '#000000',
animation: { duration: 5000 },
zones: [{
value: 250,
fillColor: '#cad8ff',
}, {
value: 500,
fillColor: '#b4c8ff'
}, {
value: 750,
fillColor: '#98b3ff'
}, {
fillColor: '#5e88ff'
}]
}]
});
distNew(数组)有250个值,但图表中显示的只有65个。