私はハイチャートを使用してmySQLのデータを表示していますが、データは一部しか印刷できません。私はsetExtremesを使う必要があるので、これがわかった。誰かが私のコードを変更してすべてのデータを解読できるように助けてもらえますか? ご協力いただければ幸いです!1000以上のmySQLポイントを持つハイチャート
私の作業コードは(ただし、一部のデータのみを表示):私はdatatemphumi.phpから何を得る
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta http-equiv="refresh" content="150">
<title>Fukt/Temp/Tryck</title>
<script type="text/javascript" src="includes/js/jquery-3.2.1.min.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
chart: {
zoomType: 'xy',
alignTicks: false,
renderTo: 'container',
type: 'line',
marginRight: 80,
marginBottom: 55
},
title: {
text: 'Temp och Fukt',
x: -20 //center
},
xAxis: {
crosshair: true,
type: 'datetime',
tickInterval: 80,
labels: {
format: '{value: %H:%M}',
dateTimeLabelFormats: {
day: '%H:%M'
}
}
},
yAxis: [{
title: {
tickInterval: 0.1,
text: '°C/%',
rotation: 0,
},
labels: {
overflow: 'justify'
}
},
{
title: {
tickInterval: 0.1,
text: '°C/%',
rotation: 0,
},
linkedTo:0,
opposite:true
}],
tooltip: {
shared: true
},
legend: {
enabled: true,
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom',
borderWidth: 0
},
series: []
}
$.getJSON("datatemphumi.php", function(json) {
options.xAxis.categories = json[3]['data'];
options.series[0] = json[1];
options.series[1] = json[2];
chart = new Highcharts.Chart(options);
});
});
</script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
</head>
<body>
<div id="container" style="min-width: 400px; height: 400px; margin: 0
auto"></div>
</body>
</html>
:https://pastebin.com/bunAhzXV
そして、私は達成したいサンプルコード:https://www.highcharts.com/blog/news/48-loading-millions-of-points-in-highcharts/
を使用して、あなたが実際にあなたが提供されたデータに問題がありますか?私はあなたのチャートオプションhttps://jsfiddle.net/peterlgh7/46nf7rq5/でこのフィドルを作ったし、それは私にはすべてのデータがあるように思える。 – Pedro