New Controllers added. Added Charts

This commit is contained in:
2017-09-19 22:01:00 +02:00
parent ccc5b07ddf
commit 930311b550
400 changed files with 30686 additions and 8 deletions

View File

@@ -0,0 +1,39 @@
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']})
google.charts.setOnLoadCallback(draw{{ $model->id }})
function draw{{ $model->id }}() {
var data = google.visualization.arrayToDataTable([
[
'', "{!! $model->element_label !!}",
@if($model->colors)
{ role: 'style' }
@endif
],
@for($i = 0; $i < count($model->values); $i++)
["{!! $model->labels[$i] !!}", {{ $model->values[$i] }},"{{ $model->colors[$i] }}"],
@endfor
])
var options = {
chart: {
@if($model->title)
title: "{!! $model->title !!}",
@endif
},
@if($model->colors)
colors:[
@foreach($model->colors as $color)
"{{ $color}}",
@endforeach
],
@endif
};
var {{ $model->id }} = new google.charts.Bar(document.getElementById("{{ $model->id }}"))
{{ $model->id }}.draw(data, options)
}
</script>
@include('charts::_partials.container.div')

View File

@@ -0,0 +1,30 @@
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']})
google.charts.setOnLoadCallback(draw{{ $model->id }})
function draw{{ $model->id }}() {
var data = google.visualization.arrayToDataTable([
['', "{!! $model->element_label !!}"],
@for($i = 0; $i < count($model->values); $i++)
["{!! $model->labels[$i] !!}", {{ $model->values[$i] }}],
@endfor
])
var options = {
chart: {
@if($model->title)
title: "{!! $model->title !!}",
@endif
},
@if($model->colors)
colors: ["{{ $model->colors[0] }}"],
@endif
};
var {{ $model->id }} = new google.charts.Line(document.getElementById("{{ $model->id }}"))
{{ $model->id }}.draw(data, options)
}
</script>
@include('charts::_partials.container.div')

View File

@@ -0,0 +1,46 @@
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']})
google.charts.setOnLoadCallback(draw{{ $model->id }})
function draw{{ $model->id }}() {
var data = google.visualization.arrayToDataTable([
[
'',
@for ($i = 0; $i < count($model->datasets); $i++)
"{{ $model->datasets[$i]['label'] }}",
@endfor
],
@for ($l = 0; $l < count($model->labels); $l++)
[
"{{ $model->labels[$l] }}",
@for ($i = 0; $i < count($model->datasets); $i++)
{{ $model->datasets[$i]['values'][$l] }},
@endfor
],
@endfor
])
var options = {
chart: {
@if($model->title)
title: "{!! $model->title !!}",
@endif
},
@if($model->colors)
colors: [
@foreach($model->colors as $c)
"{{ $c }}",
@endforeach
],
@endif
};
var {{ $model->id }} = new google.charts.Bar(document.getElementById("{{ $model->id }}"))
{{ $model->id }}.draw(data, options)
}
</script>
@include('charts::_partials.container.div')

View File

@@ -0,0 +1,46 @@
<script type="text/javascript">
google.charts.load('current', {'packages':['bar']})
google.charts.setOnLoadCallback(draw{{ $model->id }})
function draw{{ $model->id }}() {
var data = google.visualization.arrayToDataTable([
[
'',
@for ($i = 0; $i < count($model->datasets); $i++)
"{{ $model->datasets[$i]['label'] }}",
@endfor
],
@for($l = 0; $l < count($model->labels); $l++)
[
"{{ $model->labels[$l] }}",
@for ($i = 0; $i < count($model->datasets); $i++)
{{ $model->datasets[$i]['values'][$l] }},
@endfor
],
@endfor
])
var options = {
chart: {
@if($model->title)
title: "{!! $model->title !!}",
@endif
},
@if($model->colors)
colors: [
@foreach($model->colors as $c)
"{{ $c }}",
@endforeach
],
@endif
};
var {{ $model->id }} = new google.charts.Line(document.getElementById("{{ $model->id }}"))
{{ $model->id }}.draw(data, options)
}
</script>
@include('charts::_partials.container.div')