orbit-basic/app/views/admin/dashboards/_traffic_loading.erb

34 lines
1.2 KiB
Plaintext
Raw Normal View History

2013-10-30 10:23:46 +00:00
<div class="box-header">
<h2>
<i class="icons-book-2"></i>
<span class="break"></span>
2013-11-04 09:45:01 +00:00
<%= t(:monthly_traffic)%>
2013-10-30 10:23:46 +00:00
</h2>
</div>
<div class="box-content">
2013-11-04 09:45:01 +00:00
<div id="month_traffic" style="min-width: 310px; margin: 0 auto">
<%= line_chart get_month_traffic, :height => "200px", :name => 'Visit',
:library => {
legend: 'none',
chartArea:{ width: '95%', left: 50, right: 0},
hAxis:{format:'MMM-d',gridlines:{color: '#CCC', count: 31}},
vAxis:{minValue:-100,viewWindowMode: 'maximized'}
} %>
</div>
2013-10-30 10:23:46 +00:00
</div>
<script type="text/javascript">
2013-11-04 09:45:01 +00:00
renderLineChart = function (element, series, opts) {
waitForLoaded(function () {
var options = jsOptions(series, opts);
var data = createDataTable(series, "datetime");
var formatter = new google.visualization.DateFormat({
pattern: options.pattern
});
formatter.format(data, 0);
var chart = new google.visualization.LineChart(element);
resize(function () {
chart.draw(data, options);
});
});
};
2013-10-30 10:23:46 +00:00
</script>