ดูเหมือนฉันไม่สามารถทราบวิธีกำหนดช่วงเห็บได้อย่างถูกต้อง จำเป็นต้องมีเครื่องหมายที่มีความแตกต่าง 5 วันบนแกน X ฉันต้องการแสดงแกน x เช่น '1 March , 5 March , 10 March , 15 March ' ฯลฯ
สคริปต์ Java ที่ระบุด้านล่าง
<script type="text/javascript">
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'x'
},
title: {
text: 'USD to EUR exchange rate from 2006 through 2008'
},
subtitle: {
text: document.ontouchstart === undefined ?
'Click and drag in the plot area to zoom in' :
'Pinch the chart to zoom in'
},
xAxis: {
type: 'datetime',
tickInterval:24 * 3600 * 1000,
},
yAxis: {
title: {
text: 'Exchange rate'
}
},
legend: {
enabled: false
},
plotOptions: {
area: {
fillColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
stops: [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
},
marker: {
radius: 2
},
lineWidth: 1,
states: {
hover: {
lineWidth: 1
}
},
threshold: null
}
},
series: [{
type: 'area',
name: 'USD to EUR',
pointInterval: 24 * 3600 * 1000,
pointStart: Date.UTC(2015, 2, 1),
data: [[140],[127],[35],[132],[192],[179],[131],[206],[92],[57],[352],[370],[281],[282],[128],[100],[33],[215],[154],[226],[225],[334],[105],[60],[264],[227],[151],[115],[184],[74]]
}]
});
});
</script>
ขอบคุณ
category
แต่ฟังดูเหมือนเป็นdatetime
- person Halvor Holsten Strand   schedule 30.03.2015