HTML
CSS
JavaScript
HTML
<!DOCTYPE html>
<html lang="zh" >
<head>
<meta charset="UTF-8">
<title>Apexcharts - Paired Values Series Chart</title>
</head>

<body>
<div id="chart"></div>

<script src="https://cdn.bootcdn.net/ajax/libs/apexcharts/3.35.0/apexcharts.min.js"></script>
</body>
</html>
CSS
#chart {
    max-width: 650px;
    margin: 35px auto;
}
JavaScript
var options = {
  chart: {
    height: 380,
    width: "100%",
    type: "line"
  },
  series: [
    {
      name: "Series 1",
      data: [[1, 34], [3.8, 43], [5, 31] , [10, 43], [13, 33], [15, 43], [18, 33] , [20, 52]]
    }
  ],
  xaxis: {
     type: 'numeric'
  },
  tooltip: {
    x: {
      formatter: function(val) {
        return val.toFixed(1);
      }
    }
  }
};

var chart = new ApexCharts(document.querySelector("#chart"), options);

chart.render();