Chart.js

Simple HTML5 charts using the canvas element.

Latest Ver 4.4.1
Homepage
Github
0
65,784
Data dances on the canvas.
Tell your data story beautifully with charts and graphs.
Chart.js is a lightweight client-side library that provides simple, responsive charts for web pages. It supports a variety of chart types and is easy to configure and use.
License: MIT
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.min.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/helpers.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/helpers.min.js
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.cjs.map
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.js.map
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js.map
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/helpers.cjs.map

Sample Code

⚠️ Some code, including import statements, may not run properly on jsFiddle. If it fails to execute, please copy the code and try it in your own environment.
📄 HTML
<div id='chart-container' style='width: 400px; height: 400px;'><canvas id='myChart'></canvas></div>

🧩 External JS
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

⚙️ JavaScript
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: {
            y: {
                beginAtZero: true
            }
        }
    }
});
⚡ Top Tools for Developers
Text Compare

Text Comparison

Easily spot the differences between two texts.

Favicon Generator

Favicon Generator

Quickly and easily generate favicons.

Lorem Ipsum Generator

Lorem Ipsum Generator

Generate placeholder text for your designs.

Character Counter

Character Counter

Check character and word count in real time.

SRT ↔ SMI

SRT ↔ SMI Converter

Easily convert between subtitle formats.

Text Extract(OCR)

Image Text Extractor

Automatically extract text from images.