PluginProbe
Statify / 1.0
Statify v1.0
2.0.2 2.0.1 trunk 0.7 0.8 0.9 1.0 1.2.8 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 All 32 releases
statify / js / dashboard.dev.js

dashboard.dev.js in Statify 1.0, at js/dashboard.dev.js

63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 google.load("visualization", "1", {packages:["corechart"]});
2 google.setOnLoadCallback(drawChart);
3
4 function drawChart() {
5 /* Init */
6 var id,
7 rows = [],
8 output = document.getElementById('statify_chart'),
9 data = new google.visualization.DataTable();
10
11 /* Leer? */
12 if ( !output || !statify.created.length ) {
13 return;
14 }
15
16 /* Extrahieren */
17 var created = statify.created.split(','),
18 count = statify.count.split(',');
19
20 /* Loopen */
21 for (id in created) {
22 rows[id] = [created[id], parseInt(count[id], 10)];
23 }
24
25 data.addColumn('string', 'Datum');
26 data.addColumn('number', 'Aufrufe');
27 data.addRows(rows);
28
29 var chart = new google.visualization.AreaChart(output);
30
31 chart.draw(
32 data,
33 {
34 width: parseInt(jQuery('#statify_chart').parent().width(), 10),
35 height: 120,
36 legend: 'none',
37 pointSize: 6,
38 lineWidth: 3,
39 gridlineColor: '#ececec',
40 colors:['#3399CC'],
41 reverseCategories: true,
42 backgroundColor: 'transparent',
43 vAxis: {
44 baselineColor: 'transparent',
45 textPosition: 'in',
46 textStyle: {
47 color: '#8F8F8F',
48 fontSize: 10
49 }
50 },
51 hAxis: {
52 textStyle: {
53 color: '#3399CC',
54 fontSize: 10
55 }
56 },
57 chartArea: {
58 width: "100%",
59 height: "100%"
60 }
61 }
62 );
63 }