-
Notifications
You must be signed in to change notification settings - Fork 1
/
chartsScript.php
88 lines (75 loc) · 1.62 KB
/
chartsScript.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<div id="chart-container" style="height: 600px; min-width: 310px; max-width: 900px;"></div>
<script>
Highcharts.chart('chart-container', {
chart: {
type: 'bubble',
plotBorderWidth: 1,
zoomType: 'xy'
},
legend: {
enabled: false
},
title: {
text: 'Click the bubble to view article. Bigger the bubble, more the popular'
},
subtitle: {
text: ' '
},
xAxis: {
gridLineWidth: 1,
type:'datetime',
title: {
text: "Date"
}
},
yAxis: {
startOnTick: false,
endOnTick: false,
title: {
text: 'Popularity'
},
labels: {
format: '{value}'
},
maxPadding: .2,
},
zAxis: {
startOnTick: false,
endOnTick: false,
title: {
text: 'z axis'
},
labels: {
format: '{value}'
},
maxPadding: .2,
},
tooltip: {
useHTML: true,
headerFormat: '<table>',
pointFormat: '<tr>{point.heading}</tr>' +
'<tr><th>Date:</th><td><?php if($_GET["x"]=="date") echo "{point.x:%d.%m.%Y}";else echo "{point.x}";?></td></tr>' +
'<tr><th>Y axis :</th><td>{point.y}</td></tr>' +
'<tr><th>Z axis :</th><td>{point.z}</td></tr>',
footerFormat: '</table>',
followPointer: true
},
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function() {
// location.href = this.url;
window.open(this.url, '_blank');
}
}
},
dataLabels: {
enabled: false,
format: '{point.name}'
}
}
},
series: [{
data: [