chart.blade.php 1.29 KB
<div id=datachart style='min-height:300px;width:100%'></div>
<script>
$(function () {
    $('#datachart').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: ''
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: [<?php echo implode(",",array_keys($chartarray)); ?>],
            crosshair: true
        },
        yAxis: {
            min: 0,
            title: {
                text: ''
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        legend : {
            floating: true,
            align: 'right',
            x: -30,
            verticalAlign: 'top',
        },
        series: [{
            name: 'Mins',
            data: [<?php echo implode(",",array_values($chartarray)); ?>]

        },]
    });
})

</script>