-
Notifications
You must be signed in to change notification settings - Fork 676
/
_dashboard.responserates.tpl
43 lines (40 loc) · 1.33 KB
/
_dashboard.responserates.tpl
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
<h2>Response Rates</h2>
<div class="clearfix article">
<div id="response_rates"></div>
</div>
<script type="text/javascript">
// Load the Visualization API and the standard charts
google.load('visualization', '1');
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawResponseRatesChart);
{literal}
function drawResponseRatesChart() {
{/literal}
var response_rates_data = new google.visualization.DataTable({$hot_posts_data});
{literal}
var response_rates_chart = new google.visualization.ChartWrapper({
containerId: 'response_rates',
chartType: 'BarChart',
dataTable: response_rates_data,
options: {
colors: ['#3e5d9a', '#3c8ecc', '#BBCCDD'],
isStacked: true,
width: 650,
height: 250,
chartArea:{left:300,height:"80%"},
legend: 'bottom',
hAxis: {
textStyle: { color: '#fff', fontSize: 1 }
},
vAxis: {
minValue: 0,
baselineColor: '#ccc',
textStyle: { color: '#999' },
gridlines: { color: '#eee' }
},
}
});
response_rates_chart.draw();
}
{/literal}
</script>