New Controllers added. Added Charts
This commit is contained in:
59
Laravel/resources/views/vendor/charts/echarts/area.blade.php
vendored
Normal file
59
Laravel/resources/views/vendor/charts/echarts/area.blade.php
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
|
||||
data:["{!! $model->element_label !!}"]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: ["{{ $model->colors[0] }}"],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->element_label !!}",
|
||||
type: 'line',
|
||||
areaStyle: {
|
||||
normal: {
|
||||
color: "{{ count($model->colors) > 0 ? $model->colors[0] : '#c23531' }}",
|
||||
}
|
||||
},
|
||||
data: [
|
||||
@foreach($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
54
Laravel/resources/views/vendor/charts/echarts/bar.blade.php
vendored
Normal file
54
Laravel/resources/views/vendor/charts/echarts/bar.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
|
||||
data:["{!! $model->element_label !!}"]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: ["{{ $model->colors[0] }}"],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->element_label !!}",
|
||||
type: 'bar',
|
||||
data: [
|
||||
@foreach($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
58
Laravel/resources/views/vendor/charts/echarts/donut.blade.php
vendored
Normal file
58
Laravel/resources/views/vendor/charts/echarts/donut.blade.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->element_label !!}",
|
||||
type: 'pie',
|
||||
radius: ['50%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
data: [
|
||||
@for($i = 0; count($model->values) > $i; $i++)
|
||||
{value: {{ $model->values[$i] }}, name: "{{ $model->labels[$i] }}" },
|
||||
@endfor
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
60
Laravel/resources/views/vendor/charts/echarts/gauge.blade.php
vendored
Normal file
60
Laravel/resources/views/vendor/charts/echarts/gauge.blade.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->title !!}",
|
||||
type: 'gauge',
|
||||
|
||||
min: {{ ($model->values && count($model->values) > 1) ? $model->values[1] : '0' }},
|
||||
max: {{ ($model->values && count($model->values) > 2) ? $model->values[2] : '100' }},
|
||||
data: [
|
||||
{
|
||||
value: {{ $model->values[0] }},
|
||||
name: "{!! $model->element_label !!}",
|
||||
}
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
54
Laravel/resources/views/vendor/charts/echarts/line.blade.php
vendored
Normal file
54
Laravel/resources/views/vendor/charts/echarts/line.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
|
||||
data:["{!! $model->element_label !!}"]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: ["{{ $model->colors[0] }}"],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->element_label !!}",
|
||||
type: 'line',
|
||||
data: [
|
||||
@foreach($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
72
Laravel/resources/views/vendor/charts/echarts/multi/area.blade.php
vendored
Normal file
72
Laravel/resources/views/vendor/charts/echarts/multi/area.blade.php
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
"{!! $ds['label'] !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
{
|
||||
name: "{!! $ds['label'] !!}",
|
||||
type: 'line',
|
||||
areaStyle: {
|
||||
normal: {
|
||||
color: "{{ $model->colors[$loop->index] }}",
|
||||
}
|
||||
},
|
||||
data: [
|
||||
@foreach($ds['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
},
|
||||
@endforeach
|
||||
],
|
||||
});
|
||||
</script>
|
67
Laravel/resources/views/vendor/charts/echarts/multi/bar.blade.php
vendored
Normal file
67
Laravel/resources/views/vendor/charts/echarts/multi/bar.blade.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
"{!! $ds['label'] !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
{
|
||||
name: "{!! $ds['label'] !!}",
|
||||
type: 'bar',
|
||||
data: [
|
||||
@foreach($ds['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
},
|
||||
@endforeach
|
||||
],
|
||||
});
|
||||
</script>
|
67
Laravel/resources/views/vendor/charts/echarts/multi/line.blade.php
vendored
Normal file
67
Laravel/resources/views/vendor/charts/echarts/multi/line.blade.php
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
"{!! $ds['label'] !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
yAxis: {},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [
|
||||
@foreach ($model->datasets as $ds)
|
||||
{
|
||||
name: "{!! $ds['label'] !!}",
|
||||
type: 'line',
|
||||
data: [
|
||||
@foreach($ds['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
},
|
||||
@endforeach
|
||||
],
|
||||
});
|
||||
</script>
|
56
Laravel/resources/views/vendor/charts/echarts/pie.blade.php
vendored
Normal file
56
Laravel/resources/views/vendor/charts/echarts/pie.blade.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.div')
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
|
||||
|
||||
{{ $model->id }}.setOption({
|
||||
title: {
|
||||
|
||||
text: "{!! $model->title !!}"
|
||||
},
|
||||
tooltip: {},
|
||||
toolbox: {
|
||||
right: 30,
|
||||
feature: {
|
||||
@if ($model->export)
|
||||
saveAsImage: {
|
||||
title: 'Save as image',
|
||||
}
|
||||
@endif
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
|
||||
top: 50,
|
||||
data: [
|
||||
@foreach($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@if (count($model->colors) > 0)
|
||||
color: [
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
],
|
||||
@endif
|
||||
@if ($model->background_color)
|
||||
backgroundColor: "{{ $model->background_color }}",
|
||||
@endif
|
||||
series: [{
|
||||
name: "{!! $model->element_label !!}",
|
||||
type: 'pie',
|
||||
data: [
|
||||
@for($i = 0; count($model->values) > $i; $i++)
|
||||
{value: {{ $model->values[$i] }}, name: "{{ $model->labels[$i] }}" },
|
||||
@endfor
|
||||
],
|
||||
animationDelay: function (idx) {
|
||||
return idx * 100;
|
||||
}
|
||||
}],
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user