updated reports
This commit is contained in:
		@@ -18,9 +18,7 @@
 | 
			
		||||
            {!! Form::close() !!}
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="box-body">
 | 
			
		||||
            <div class="chart">
 | 
			
		||||
                <canvas id="income_graph" style="height: 246px; width: 1069px;" height="246" width="1069"></canvas>
 | 
			
		||||
            </div>
 | 
			
		||||
            {!! $chart->render() !!}
 | 
			
		||||
 | 
			
		||||
            <hr>
 | 
			
		||||
 | 
			
		||||
@@ -69,55 +67,5 @@
 | 
			
		||||
@endsection
 | 
			
		||||
 | 
			
		||||
@push('js')
 | 
			
		||||
    <script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/chartjs/Chart.min.js') }}"></script>
 | 
			
		||||
@endpush
 | 
			
		||||
 | 
			
		||||
@push('scripts')
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        $(document).ready(function () {
 | 
			
		||||
            var areaChartData = {
 | 
			
		||||
                labels: {!! json_encode(array_values($dates)) !!},
 | 
			
		||||
                datasets: [
 | 
			
		||||
                    {
 | 
			
		||||
                        label: "{{ trans_choice('general.incomes', 2) }}",
 | 
			
		||||
                        fillColor: "#00c0ef",
 | 
			
		||||
                        strokeColor: "#00c0ef",
 | 
			
		||||
                        pointColor: "#00c0ef",
 | 
			
		||||
                        pointStrokeColor: "#00c0ef",
 | 
			
		||||
                        pointHighlightFill: "#FFF",
 | 
			
		||||
                        pointHighlightStroke: "#00c0ef",
 | 
			
		||||
                        data: {!! $incomes_graph !!}
 | 
			
		||||
                    }
 | 
			
		||||
                ]
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            var areaChartOptions = {
 | 
			
		||||
                showScale: true,
 | 
			
		||||
                scaleShowGridLines: false,
 | 
			
		||||
                scaleGridLineColor: "rgba(0,0,0,.05)",
 | 
			
		||||
                scaleGridLineWidth: 1,
 | 
			
		||||
                scaleShowHorizontalLines: true,
 | 
			
		||||
                scaleShowVerticalLines: true,
 | 
			
		||||
                bezierCurve: true,
 | 
			
		||||
                bezierCurveTension: 0.3,
 | 
			
		||||
                pointDot: false,
 | 
			
		||||
                pointDotRadius: 4,
 | 
			
		||||
                pointDotStrokeWidth: 1,
 | 
			
		||||
                pointHitDetectionRadius: 20,
 | 
			
		||||
                datasetStroke: true,
 | 
			
		||||
                datasetStrokeWidth: 2,
 | 
			
		||||
                datasetFill: true,
 | 
			
		||||
                legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>",
 | 
			
		||||
                maintainAspectRatio: true,
 | 
			
		||||
                responsive: true
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            var cashFlowDailyCanvas = $("#income_graph").get(0).getContext("2d");
 | 
			
		||||
            var cashFlowDaily = new Chart(cashFlowDailyCanvas);
 | 
			
		||||
            var cashFlowDailyOptions = areaChartOptions;
 | 
			
		||||
 | 
			
		||||
            cashFlowDailyOptions.datasetFill = false;
 | 
			
		||||
            cashFlowDaily.Line(areaChartData, cashFlowDailyOptions);
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
{!! Charts::assets() !!}
 | 
			
		||||
@endpush
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user