laravel-admin-extensions / chartjs

Licence: MIT license
Use Chartjs in laravel-admin

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to chartjs

github-user-languages
Browser extension that adds little language pie charts to a user's profile page on GitHub.
Stars: ✭ 41 (-57.73%)
Mutual labels:  chartjs
data-11ty
An open source 11ty theme designed for reporting & data-visualization
Stars: ✭ 19 (-80.41%)
Mutual labels:  chartjs
chartjs-plugin-downsample
Chart.js plugin to downsample chart data
Stars: ✭ 41 (-57.73%)
Mutual labels:  chartjs
charts
Laravel Enso Charts is a VueJS, wrapper for Chart.js, with a backend data builder, so you can add beautiful charts to your application
Stars: ✭ 15 (-84.54%)
Mutual labels:  chartjs
chartjs-chart-timeline
Google-like timeline chart for Chart.js.
Stars: ✭ 44 (-54.64%)
Mutual labels:  chartjs
PiFire
PiFire is a Smart WiFi enabled controller for your pellet smoker / grill.
Stars: ✭ 41 (-57.73%)
Mutual labels:  chartjs
Ticket-Travel-Management-System
It's a e_Ticketing platform, it has whole ticket reservation system as like ixigo.com. Now three types of traveling such as Flight, Bus and Train reservation system. It's a responsive and dynamic PHP website.
Stars: ✭ 39 (-59.79%)
Mutual labels:  chartjs
redis-manager
Redis manager for laravel-admin
Stars: ✭ 97 (+0%)
Mutual labels:  laravel-admin
phpchartjs
A PHP library that makes it easy to generate data for ChartJS.
Stars: ✭ 24 (-75.26%)
Mutual labels:  chartjs
competiwatch
Web app to track and visualize your competitive match history in Overwatch.
Stars: ✭ 17 (-82.47%)
Mutual labels:  chartjs
chart
📊📉 Add beautiful and reusable charts with one line of ruby for Rails 5.x
Stars: ✭ 42 (-56.7%)
Mutual labels:  chartjs
Chart.js-Rounded-Bar-Charts
Rounded Rectangles in Bar Charts
Stars: ✭ 48 (-50.52%)
Mutual labels:  chartjs
hugo-chart
a Chart.js component for Hugo. 📈
Stars: ✭ 71 (-26.8%)
Mutual labels:  chartjs
dashblocks-template
Dashblocks Vue Material Admin Template
Stars: ✭ 143 (+47.42%)
Mutual labels:  chartjs
vuejs-admin-dashboard-template
Mosaic Lite is a free admin dashboard template built on top of Tailwind CSS and fully coded in Vue. Made by
Stars: ✭ 139 (+43.3%)
Mutual labels:  chartjs
powir
Powir is a Windows 10 based tool to monitor and analyze your system's power and battery usage.
Stars: ✭ 119 (+22.68%)
Mutual labels:  chartjs
chartjs-chart-graph
Chart.js Graph-like Charts (tree, force directed)
Stars: ✭ 103 (+6.19%)
Mutual labels:  chartjs
laravel-vue-ssr-spa
基于Laravel-vue的服务端渲染 SSR 和单页应用 SPA 通用框架方案
Stars: ✭ 40 (-58.76%)
Mutual labels:  laravel-admin
wangEditor
wangEditor extension for laravel-admin
Stars: ✭ 61 (-37.11%)
Mutual labels:  laravel-admin
chartjs-web-components
the web components for chartjs
Stars: ✭ 50 (-48.45%)
Mutual labels:  chartjs

Use Chartjs in laravel-admin

DEMO

Login using admin/admin

Screenshot

qq20180917-132122

Installation

composer require laravel-admin-ext/chartjs

php artisan vendor:publish --tag=laravel-admin-chartjs

Configuration

Open config/admin.php, add configurations that belong to this extension at extensions section.

    'extensions' => [

        'chartjs' => [
        
            // Set to `false` if you want to disable this extension
            'enable' => true,
        ]
    ]

Usage

Create a view in views directory like resources/views/admin/chartjs.blade.php, and add following codes:

<canvas id="myChart" width="400" height="400"></canvas>
<script>
$(function () {
    var ctx = document.getElementById("myChart").getContext('2d');
    var myChart = new Chart(ctx, {
        type: 'bar',
        data: {
            labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
            datasets: [{
                label: '# of Votes',
                data: [12, 19, 3, 5, 2, 3],
                backgroundColor: [
                    'rgba(255, 99, 132, 0.2)',
                    'rgba(54, 162, 235, 0.2)',
                    'rgba(255, 206, 86, 0.2)',
                    'rgba(75, 192, 192, 0.2)',
                    'rgba(153, 102, 255, 0.2)',
                    'rgba(255, 159, 64, 0.2)'
                ],
                borderColor: [
                    'rgba(255,99,132,1)',
                    'rgba(54, 162, 235, 1)',
                    'rgba(255, 206, 86, 1)',
                    'rgba(75, 192, 192, 1)',
                    'rgba(153, 102, 255, 1)',
                    'rgba(255, 159, 64, 1)'
                ],
                borderWidth: 1
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero:true
                    }
                }]
            }
        }
    });
});
</script>

Then show it on the page

class ChartjsController extends Controller
{
    public function index(Content $content)
    {
        return $content
            ->header('Chartjs')
            ->body(new Box('Bar chart', view('admin.chartjs')));
    }
}

For more usage, please refer to the official documentation of chartjs.

Donate

Help keeping the project development going, by donating a little. Thanks in advance.

PayPal Me

-1

License

Licensed under The MIT License (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].