From f50b6e9c3e334537c4995aff26f43e233a7b1f6c Mon Sep 17 00:00:00 2001
From: "Eduardo L. Buratti" <elb09@c3sl.ufpr.br>
Date: Wed, 30 Oct 2013 10:27:23 -0200
Subject: [PATCH] web: Add default netusageChart to default-charts.js

Signed-off-by: Eduardo L. Buratti <elb09@c3sl.ufpr.br>
---
 web/assets/js/default-charts.js | 100 ++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/web/assets/js/default-charts.js b/web/assets/js/default-charts.js
index 03d2a8b..7c48fc2 100644
--- a/web/assets/js/default-charts.js
+++ b/web/assets/js/default-charts.js
@@ -200,5 +200,105 @@ var DefaultCharts = {
             {name: 'Último contato entre 11 e 30 dias'},
             {name: 'Último contato há mais de 30 dias'}
         ]
+    },
+
+    netusageChart: {
+        chart: {
+            height: 550,
+        },
+        rangeSelector : {
+            selected : 1,
+            inputDateFormat: '%d/%m/%Y',
+            buttonTheme: {
+                width: 75,
+            },
+            buttons: [{
+                type: 'day',
+                count: 1,
+                text: 'Diário'
+            }, {
+                type: 'week',
+                count: 1,
+                text: 'Semanal'
+            }, {
+                type: 'month',
+                count: 1,
+                text: 'Mensal'
+            }, {
+                type: 'month',
+                count: 6,
+                text: 'Semestral'
+            }, {
+                type: 'year',
+                count: 1,
+                text: 'Anual'
+            }]
+        },
+        plotOptions: {
+            line: {
+                gapSize: 1,
+                connectNulls: false,
+            }
+        },
+        xAxis: {
+            type: 'datetime',
+            ordinal: false,
+            dateTimeLabelFormats: {
+                second: '%d/%m/%Y<br/>%H:%M:%S',
+                minute: '%d/%m/%Y<br/>%H:%M',
+                hour: '%d/%m/%Y<br/>%H:%M',
+                day: '%d/%m/%Y',
+                week: '%d/%m/%Y',
+                month: '%Y<br/>%b',
+                year: '%Y'
+            },
+            tickPixelInterval: 200
+        },
+        yAxis: {
+            gridLineDashStyle: 'dash',
+            gridLineColor: '#ddd',
+            alternateGridColor: '#f3faff',
+            minRange: 1024,
+            min: 0,
+            allowDecimals: false,
+            labels: {
+                formatter: function() {
+                    return formatKBits(this.value);
+                }
+            }
+        },
+        navigator: {
+            height: 60,
+            xAxis: {
+                dateTimeLabelFormats: {
+                    second: '%d/%m/%Y',
+                    minute: '%d/%m/%Y',
+                    hour: '%d/%m/%Y',
+                    day: '%d/%m/%Y',
+                    week: '%d/%m/%Y',
+                    month: '%m/%Y',
+                    year: '%Y'
+                }
+            }
+        },
+        credits: {
+            enabled: false
+        },
+        legend: {
+            enabled: true
+        },
+        series : [{
+            name : 'Download',
+            pointInterval: 5 * 1000,
+            dataGrouping: {
+                enabled: false
+            },
+        }, {
+            name : 'Upload',
+            pointInterval: 5 * 1000,
+            dataGrouping: {
+                enabled: false
+            },
+        }]
     }
 };
\ No newline at end of file
-- 
GitLab