responsive chart

This commit is contained in:
Philip Häusler 2015-07-18 21:32:50 +02:00
parent 46f0636f2f
commit d414c455a2
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ function admin_arrive() {
<script type="text/javascript">
$(function(){
var ctx = $("#daily_arrives").get(0).getContext("2d");
new Chart(ctx).Bar(' . json_encode(array(
var chart = new Chart(ctx).Bar(' . json_encode(array(
'labels' => array_keys($arrival_count_at_day),
'datasets' => array(
array(
@ -117,7 +117,7 @@ function admin_arrive() {
'data' => array_values($arrival_sums)
)
)
)) . ');
)) . ', {"responsive": true});
});
</script>'
));