PHP Classes

File: resources/views/chart/script.blade.php

Recommend this page to a friend!
  Classes of Ariel Mejia Dev  >  APEXCharts Laravel Charts Library  >  resources/views/chart/script.blade.php  >  Download  
File: resources/views/chart/script.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: APEXCharts Laravel Charts Library
Display charts on a page using APEXCharts library
Author: By
Last change:
Date: 1 year ago
Size: 876 bytes
 

Contents

Class file image Download
<script>
    var options =
    {
        chart: {
            type: '{!! $chart->type() !!}',
            height: {!! $chart->height() !!}
        },
        plotOptions: {
            bar: {!! $chart->horizontal() !!}
        },
        colors: {!! $chart->colors() !!},
        series:
        {!! $chart->dataset() !!},
        dataLabels: {
            enabled: false
        },
        labels: [{!! $chart->labels() !!}],
        title: {
            text: "{!! $chart->title() !!}"
        },
        subtitle: {
            text: '{!! $chart->subtitle() !!}',
            align: '{!! $chart->subtitlePosition() !!}'
        },
        xaxis: {
            categories: {!! $chart->xAxis() !!}
        },
        grid: {!! $chart->grid() !!},
    }

    var chart = new ApexCharts(document.querySelector("#{!! $chart->id() !!}"), options);
    chart.render();

</script>

For more information send a message to info at phpclasses dot org.