-
Notifications
You must be signed in to change notification settings - Fork 0
/
7.19.php
69 lines (62 loc) · 1.97 KB
/
7.19.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<div class="container" style="margin-top:30px">
<div class="row">
<div class="col-sm-12">
<h1>Figure: <?= $get_figure ?></h1>
this data has over 800,000 data points, loading from csv is not feasible, the only way to render this chart quickly is to downscale the data using a dataloader via database.
<div id="chartdiv"></div>
</div>
</div>
</div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/boost-canvas.js"></script>
<script src="https://code.highcharts.com/modules/boost.js"></script>
<script src="https://code.highcharts.com/modules/data.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script>
Highcharts.chart('chartdiv', {
chart: {
type: 'column',
zoomType: 'x'
},
boost: {
useGPUTranslations: true
},
title: {
text: ''
},
data: {
csvURL: window.location.origin + '/F7.19/parsed.csv',
parsed: function(columns) {
var newColumns = [];
Highcharts.each(columns, function(c, j) {
newColumns.push([]);
Highcharts.each(c, function(p, i) {
//console.log(p);
newColumns[j].push(parseFloat(p) || null)
})
});
this.columns = newColumns;
}
},
xAxis: {
type: 'datetime',
title: {
text: 'Dates'
},
"labels": {
"format": "{value:%Y-%m-%d}"
}
},
yAxis: {
title: {
text: 'Meters above chart datum'
}
},
plotOptions:{
series:{
connectNulls:true,
turboThreshold: 1
}
},
});
</script>