-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiosGraph.php
executable file
·109 lines (108 loc) · 3.95 KB
/
iosGraph.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require("funcs/dbFunctions.php");
echo "<html>\n";
echo "<body>\n";
$fizyTrend=getIosTRend('fizy');
$bipTrend=getIosTRend('bip');
$depoTrend=getIosTRend('depo');
echo " <script type=\"text/javascript\">\n";
echo " window.onload = function () {\n";
echo " var chart = new CanvasJS.Chart(\"chartContainer\",\n";
echo " {\n";
echo "\n";
echo " title:{\n";
echo " text: \"IOS App Store Rating Trend\",\n";
echo " fontSize: 30\n";
echo " },\n";
echo " animationEnabled: true,\n";
echo " axisX:{\n";
echo "\n";
echo " gridColor: \"Yellow\",\n";
echo " tickColor: \"silver\",\n";
echo " valueFormatString: \"DD/MMM\"\n";
echo "\n";
echo " }, \n";
echo " toolTip:{\n";
echo " shared:true\n";
echo " },\n";
echo " theme: \"theme1\",\n";
echo " axisY: {\n";
echo " gridColor: \"Silver\",\n";
echo " tickColor: \"silver\"\n";
echo " },\n";
echo " legend:{\n";
echo " verticalAlign: \"center\",\n";
echo " horizontalAlign: \"right\"\n";
echo " },\n";
echo " data: [\n";
echo " { \n";
echo " type: \"line\",\n";
echo " showInLegend: true,\n";
echo " lineThickness: 2,\n";
echo " name: \"Fizy\",\n";
echo " markerType: \"square\",\n";
echo " color: \"#F08080\",\n";
echo " dataPoints: [\n";
echo $fizyTrend;
echo " ]\n";
echo " },\n";
echo " { \n";
echo " type: \"line\",\n";
echo " showInLegend: true,\n";
echo " name: \"Bip\",\n";
echo " color: \"#20B2AA\",\n";
echo " markerType: \"triangle\",\n";
echo " lineThickness: 2,\n";
echo "\n";
echo " dataPoints: [\n";
echo $bipTrend;
// echo " { x: new Date(2016,08,02), y: 510 },\n";
// echo " { x: new Date(2016,08,03), y: 560 },\n";
// echo " { x: new Date(2016,08,04), y: 540 },\n";
// echo " { x: new Date(2016,08,05), y: 558 }\n";
echo " ]\n";
echo " },\n";
echo " { \n";
echo " type: \"line\",\n";
echo " showInLegend: true,\n";
echo " name: \"Depo\",\n";
echo " color: \"#00B2FF\",\n";
echo " lineThickness: 2,\n";
echo "\n";
echo " dataPoints: [\n";
echo $depoTrend;
// echo " { x: new Date(2016,08,02), y: 410 },\n";
// echo " { x: new Date(2016,08,03), y: 660 },\n";
// echo " { x: new Date(2016,08,04), y: 740 },\n";
// echo " { x: new Date(2016,08,05), y: 858 }\n";
echo " ]\n";
echo " }\n";
echo " \n";
echo " ],\n";
echo " legend:{\n";
echo " cursor:\"pointer\",\n";
echo " itemclick:function(e){\n";
echo " if (typeof(e.dataSeries.visible) === \"undefined\" || e.dataSeries.visible) {\n";
echo " e.dataSeries.visible = false;\n";
echo " }\n";
echo " else{\n";
echo " e.dataSeries.visible = true;\n";
echo " }\n";
echo " chart.render();\n";
echo " }\n";
echo " }\n";
echo " });\n";
echo "\n";
echo "chart.render();\n";
echo "}\n";
echo "</script>\n";
echo "<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js\"></script>\n";
echo "\n";
echo " <div id=\"chartContainer\" style=\"height: 300px; width: 70%;\">\n";
echo " </div>\n";
echo "</body>\n";
echo "</html>\n";
echo "\n";
?>