7
선택한 날짜 (시작 날짜 및 종료 일자)에 대한 영역 그래프를 생성하는 아래 코드를 작성했습니다.하이 차트 그래프 다양한 날짜 범위의 X 축 레이블
$(document).ready(function() {
var options = {
"series": [{
"showInLegend": false,
"color": "#D0D0D0",
"name": "Revenue",
"data": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}],
"credits": {
"enabled": false
},
"chart": {
"renderTo": "highchart_id",
"defaultSeriesType": "area",
"shadow": true
},
"title": {
"text": null,
"align": "center",
"x": 0,
"y": 20
},
"xAxis": {
"type": "datetime",
"dateTimeLabelFormats": {
"month": "%e. %b",
"year": "%b"
},
"labels": {
"enabled": "false"
}
},
"legend": {
"enabled": true
},
"yAxis": {
"title": {
"text": ""
},
"labels": {
"enabled": true
}
},
"plotOptions": {
"area": {
"stacking": "normal",
"lineColor": "#3E3E3E",
"lineWidth": 3,
"marker": {
"lineWidth": "1",
"lineColor": "#3E3E3E",
"states": {
"hover": {
"enabled": true,
"radius": 1
}
}
}
},
"series": {
"pointStart": 1335823200000,
"pointInterval": 86400000
}
}
};
var chart = new Highcharts.Chart(options);
});
x 축의 날짜 간격이 하루 더 짧아집니다. 여기에 시리즈 값 2는 10에 대한 것이고 9에 대해서는 그래프에 표시됩니다.
이 하이 차트를 처음 접했을 때 아무에게도 해결책을 알려주고 문제에 대한 설명이 더 필요하면 알려 주시기 바랍니다. 기본 highchart 사용 UTC 시간으로 차트
Highcharts.setOptions({
global: {
useUTC: false
}
});
를 선언하기 전에이 코드를 추가
대단히 감사합니다. 그것은 효과가있다! –