New Controllers added. Added Charts
This commit is contained in:
39
Laravel/resources/views/vendor/charts/material/bar.blade.php
vendored
Normal file
39
Laravel/resources/views/vendor/charts/material/bar.blade.php
vendored
Normal 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')
|
30
Laravel/resources/views/vendor/charts/material/line.blade.php
vendored
Normal file
30
Laravel/resources/views/vendor/charts/material/line.blade.php
vendored
Normal 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')
|
46
Laravel/resources/views/vendor/charts/material/multi/bar.blade.php
vendored
Normal file
46
Laravel/resources/views/vendor/charts/material/multi/bar.blade.php
vendored
Normal 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')
|
46
Laravel/resources/views/vendor/charts/material/multi/line.blade.php
vendored
Normal file
46
Laravel/resources/views/vendor/charts/material/multi/line.blade.php
vendored
Normal 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')
|
Reference in New Issue
Block a user