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,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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>