New Controllers added. Added Charts
This commit is contained in:
34
Laravel/resources/views/vendor/charts/progressbarjs/percentage.blade.php
vendored
Normal file
34
Laravel/resources/views/vendor/charts/progressbarjs/percentage.blade.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
@php($min = count($model->values) >= 2 ? $model->values[1] : 0)
|
||||
@php($max = count($model->values) >= 3 ? $model->values[2] : 100)
|
||||
|
||||
@include('charts::_partials.container.div-titled')
|
||||
@include('charts::_partials.dimension.svg')
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var {{ $model->id }} = new ProgressBar.Circle('#{{ $model->id }}', {
|
||||
@if($model->colors and count($model->colors) >= 2)
|
||||
color: "{{ $model->colors[1] }}",
|
||||
@else
|
||||
color: '#000',
|
||||
@endif
|
||||
|
||||
// This has to be the same size as the maximum width to
|
||||
// prevent clipping
|
||||
strokeWidth: 4,
|
||||
trailWidth: 1,
|
||||
easing: 'easeInOut',
|
||||
duration: 1000,
|
||||
text: {
|
||||
autoStyleContainer: false
|
||||
},
|
||||
from: { color: '#aaa', width: 4 },
|
||||
to: { color: @if($model->colors)"{{ $model->colors[0] }}" @else '#333' @endif , width: 4 },
|
||||
// Set default step function for all animate calls
|
||||
step: function(state, circle) {
|
||||
circle.path.setAttribute('stroke', state.color)
|
||||
circle.path.setAttribute('stroke-width', state.width)
|
||||
}
|
||||
});
|
||||
{{ $model->id }}.animate({{ ($model->values[0] - $min) / ($max - $min) }});
|
||||
});
|
||||
</script>
|
25
Laravel/resources/views/vendor/charts/progressbarjs/progressbar.blade.php
vendored
Normal file
25
Laravel/resources/views/vendor/charts/progressbarjs/progressbar.blade.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
@php($min = count($model->values) >= 2 ? $model->values[1] : 0)
|
||||
@php($max = count($model->values) >= 3 ? $model->values[2] : 100)
|
||||
|
||||
@include('charts::_partials.container.title')
|
||||
<div id="{{ $model->id }}" style="position: relative;@include('charts::_partials.dimension.css')"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var {{ $model->id }} = new ProgressBar.Line('#{{ $model->id }}', {
|
||||
@if($model->colors and count($model->colors))
|
||||
color: "{{ $model->colors[0] }}",
|
||||
@else
|
||||
color: '#ffc107',
|
||||
@endif
|
||||
strokeWidth: 4,
|
||||
svgStyle: {width: '100%', height: '100%'},
|
||||
easing: 'easeInOut',
|
||||
duration: 1000,
|
||||
trailColor: '#eee',
|
||||
trailWidth: 4,
|
||||
})
|
||||
|
||||
{{ $model->id }}.animate({{ ($model->values[0] - $min) / ($max - $min) }})
|
||||
});
|
||||
</script>
|
41
Laravel/resources/views/vendor/charts/progressbarjs/realtime/percentage.blade.php
vendored
Normal file
41
Laravel/resources/views/vendor/charts/progressbarjs/realtime/percentage.blade.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
@php($min = count($model->values) >= 2 ? $model->values[1] : 0)
|
||||
@php($max = count($model->values) >= 3 ? $model->values[2] : 100)
|
||||
|
||||
@include('charts::_partials.container.div-titled')
|
||||
@include('charts::_partials.dimension.svg')
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var {{ $model->id }} = new ProgressBar.Circle('#{{ $model->id }}', {
|
||||
@if($model->colors and count($model->colors) >= 2)
|
||||
color: {{ $model->colors[1] }},
|
||||
@else
|
||||
color: '#000',
|
||||
@endif
|
||||
// This has to be the same size as the maximum width to
|
||||
// prevent clipping
|
||||
strokeWidth: 4,
|
||||
trailWidth: 1,
|
||||
easing: 'easeInOut',
|
||||
duration: 1000,
|
||||
text: {
|
||||
autoStyleContainer: false
|
||||
},
|
||||
from: { color: '#aaa', width: 4 },
|
||||
to: { color: "{{ $model->colors ? $model->colors[0] : '#333' }}", width: 4 },
|
||||
// Set default step function for all animate calls
|
||||
step: function(state, circle) {
|
||||
circle.path.setAttribute('stroke', state.color)
|
||||
circle.path.setAttribute('stroke-width', state.width)
|
||||
}
|
||||
})
|
||||
|
||||
{{ $model->id }}.animate({{ ($model->values[0] - $min) / ($max - $min) }})
|
||||
|
||||
setInterval(function() {
|
||||
$.getJSON("{{ $model->url }}", function( jdata ) {
|
||||
var v = (jdata["{{ $model->value_name }}"] - {{ $min }})/({{ $max }} - {{ $min }});
|
||||
{{ $model->id }}.animate(v);
|
||||
})
|
||||
}, {{ $model->interval }})
|
||||
});
|
||||
</script>
|
32
Laravel/resources/views/vendor/charts/progressbarjs/realtime/progressbar.blade.php
vendored
Normal file
32
Laravel/resources/views/vendor/charts/progressbarjs/realtime/progressbar.blade.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
@php($min = count($model->values) >= 2 ? $model->values[1] : 0)
|
||||
@php($max = count($model->values) >= 3 ? $model->values[2] : 100)
|
||||
|
||||
@include('charts::_partials.container.title')
|
||||
<div id="{{ $model->id }}" style="position: relative;@include('charts::_partials.dimension.css')"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var {{ $model->id }} = new ProgressBar.Line('#{{ $model->id }}', {
|
||||
@if($model->colors)
|
||||
color: "{{ $model->colors[0] }}",
|
||||
@else
|
||||
color: '#ffc107',
|
||||
@endif
|
||||
strokeWidth: 4,
|
||||
svgStyle: {width: '100%', height: '100%'},
|
||||
easing: 'easeInOut',
|
||||
duration: 1000,
|
||||
trailColor: '#eee',
|
||||
trailWidth: 4,
|
||||
})
|
||||
|
||||
{{ $model->id }}.animate({{ ($model->values[0] - $min) / ($max - $min) }})
|
||||
|
||||
setInterval(function() {
|
||||
$.getJSON("{{ $model->url }}", function( jdata ) {
|
||||
var v = (jdata["{{ $model->value_name }}"] - {{ $min }})/({{ $max }} - {{ $min }})
|
||||
{{ $model->id }}.animate(v)
|
||||
})
|
||||
}, {{ $model->interval }})
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user