Basic Line Chart in JavaScript

Using ApexCharts with JavaScript

This Basic Line Chart example uses ApexCharts.js directly in JavaScript, with no wrapper component.

Install it with npm install apexcharts, then mount the chart with new ApexCharts(element, options).render().

JavaScript installation guide
var options = {
  series: [
    {
      name: 'Sign-ups',
      data: [210, 380, 340, 520, 480, 610, 700, 880, 820, 1040, 1180, 1520],
    },
  ],
  chart: {
    height: 350,
    type: 'line',
    zoom: {
      enabled: false,
    },
  },
  dataLabels: {
    enabled: false,
  },
  stroke: {
    curve: 'straight',
  },
  title: {
    text: 'New Sign-ups by Month',
    align: 'left',
  },
  xaxis: {
    categories: [
      'Jan',
      'Feb',
      'Mar',
      'Apr',
      'May',
      'Jun',
      'Jul',
      'Aug',
      'Sep',
      'Oct',
      'Nov',
      'Dec',
    ],
  },
}

var chart = new ApexCharts(document.querySelector('#chart'), options)
chart.render()