Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 29, 2024 via pnpm

chart.js 4.4.0

Simple HTML5 charts using the canvas element.
Package summary
Share
0
issues
1
license
2
MIT
Package created
8 Jul 2014
Version published
24 Aug 2023
Maintainers
5
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
@kurkle/color@0.3.2
chart.js@4.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of chart.js 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@kurkle/color0.3.220.09 kBMIT
prod

Visualizations

Frequently Asked Questions

What does chart.js do?

Chart.js is a JavaScript library that enables designers and developers to create simple yet flexible charts using the HTML5 canvas element. This powerful tool supports a variety of chart types, including line, bar, pie, and radar charts, among others. Built for simplicity and flexibility, Chart.js provides an optimal solution for data visualization in web projects.

How do you use chart.js?

Using Chart.js is quite straightforward. First, you need to add the Chart.js script to your project by including it in your HTML file like so:

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

Then, you can create a canvas element in your HTML where the chart will be drawn:

<canvas id="myChart"></canvas>

Next, in your JavaScript file or script tag, you can create a new chart by creating a Chart object:

var ctx = document.getElementById('myChart').getContext('2d');
var myChart = new Chart(ctx, {
    type: 'line',  // type of chart: line, bar, radar, doughnut, etc.
    data: {
        labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
        datasets: [{
            label: 'Sales',
            data: [12, 19, 3, 5, 2, 3, 9, 10, 12, 17, 19, 22]
        }]
    },
    options: {
        scales: {
            y: {
                beginAtZero: true
            }
        }
    }
});

Where are the chart.js docs?

The complete and thorough documentation for Chart.js can be found on their official website, Chart.js Documentation. Here, you can explore detailed guides on getting started with Chart.js, along with in-depth explanations about the general usage, different chart configurations, and diverse features that the library offers. The documentation also provides links to popular extensions and sample charts built with Chart.js. If you're looking for documentation of an older version of the library, you can find it by specifying the version in the URL, for example, Chart.js 2.9.4 Documentation.