![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/resources/views/vendor/charts/progressbarjs/ |
@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"> var {{ $model->id }}; $(function() { {{ $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>