Skip to content

Instantly share code, notes, and snippets.

@jimdoan4
Created February 13, 2019 13:00
Chart.js Cheatsheet
// Github Chartjs Page
https://github.com/chartjs
// Chartjs Website
https://www.chartjs.org/
// If you have any questions about Chart.js, ask via stackoverflow
https://stackoverflow.com/questions/tagged/chart.js
// Extensions to add on your page
https://www.chartjs.org/docs/latest/notes/extensions.html
// Installation page
https://www.chartjs.org/docs/latest/getting-started/installation.html
// Available Charts for use
Line, Bar, Radar, Doughnut & Pie, Polar Area, Bubble, Scatter, Area and Mixed
// Links to Sample page to view all the charts usage
https://www.chartjs.org/samples/latest/
// CDN to add on your HTML file
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js
// Prepopulated code to add into your HTML file to create a chart
<canvas id="myChart" width="400" height="400"></canvas>
<script>
var ctx = document.getElementById("myChart").getContext('2d');
var myBarChart = new Chart(ctx, {
type: 'bar',
data: data,
options: options
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment