# Getting Started

Let's get started using Chart.js!

First, we need to have a canvas in our page. It's recommended to give the chart its own container for responsiveness.

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

Now that we have a canvas we can use, we need to include Chart.js in our page.

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

Now, we can create a chart. We add a script to our page:

const config = {
  type: 'line',
  options: {}

Finally, render the chart using our configuration:

  // === include 'setup' then 'config' above ===
  var myChart = new Chart(

It's that easy to get started using Chart.js! From here you can explore the many options that can help you customise your charts with scales, tooltips, labels, colors, custom actions, and much more.

All our examples are available online but you can also download the Chart.js.zip archive attached to every release (opens new window) to experiment with our samples locally from the /samples folder.

Last Updated: 5/1/2021, 6:04:59 PM