Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /home/fdshops/public_html/resources/views/vendor/charts/google/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/fdshops/public_html/resources/views/vendor/charts/google/gauge.blade.php
<script type="text/javascript">
    google.charts.setOnLoadCallback(draw{{ $model->id }})

    function draw{{ $model->id }}() {
        var data = google.visualization.arrayToDataTable([
            ['Element', 'Value'],
            ["{!! $model->element_label !!}", {{ $model->values[0] }}],
        ])

        var options = {
            @include('charts::_partials.dimension.js')

            @if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
                @php($min = $model->values[1])
                min: {{ $min }},
            @else
                @php($min = 0)
            @endif

            @if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
                @php($max = $model->values[2])
                max: {{ $max }},
            @else
                @php($max = 100)
            @endif

            @if($model->gauge_style == 'right')
                // Calculate warning area
                @php
                    $low_warning = round(0.40 * $max, 2)
                    $warning = round(0.25 * $max, 2)
                    $max_warning = round(0.10 * $max, 2)
                @endphp

                greenColor: '#c8e6c9', yellowColor: '#ffd54f', redColor: '#e57373',
                greenFrom: $low_warning, greenTo: $max,
                yellowFrom: $max_warning, yellowTo: $low_warning,
                redFrom: $min, redTo: $max_warning,
            @elseif($model->gauge_style == 'center') {
                // Calculate warning area
                @php
                    $warning = round(0.25 * $max, 2)
                    $warning2 = round(0.75 * $max, 2)
                @endphp

                greenColor: '#c8e6c9', yellowColor: '#ffd54f', redColor: '#ffd54f',
                greenFrom: $warning, greenTo: $warning2,
                yellowFrom: $min, yellowTo: $warning,
                redFrom: $warning2, redTo: $max,
            @else
                // Calculate warning area
                @php
                    $low_warning = round(0.60 * $max, 2)
                    $warning = round(0.75 * $max, 2)
                    $max_warning = round(0.90 * $max, 2)
                @endphp

                greenColor: '#c8e6c9', yellowColor: '#ffd54f', redColor: '#e57373',
                greenFrom: $min, greenTo: $low_warning,
                yellowFrom: $low_warning, yellowTo: $max_warning,
                redFrom: $max_warning, redTo: $max,
            @endif

            minorTicks: 10,
        };

        var {{ $model->id }} = new google.visualization.Gauge(document.getElementById("{{ $model->id }}"))
        {{ $model->id }}.draw(data, options)
    }
</script>

@if(!$model->customId)
    @include('charts::_partials/container.div-titled')
@endif

Spamworldpro Mini