YouTip LogoYouTip

Chart.js Tutorial - Getting Started

Chart.js

new Chart(document.getElementById("chart"), {
    type: "bar",
    data: {
        labels: ["Red", "Blue", "Yellow"],
        datasets: [{
            data: [12, 19, 3],
            backgroundColor: ["red", "blue", "yellow"]
        }]
    }
});

Summary

  • Chart.js is free and open-source
  • Supports bar, line, pie, doughnut, radar charts
← SciPy Tutorial - Getting StartHighcharts Tutorial - Getting β†’