<!DOCTYPE html> <html lang="zh" > <head> <meta charset="UTF-8"> <title>Apexcharts - Paired Values (xy) 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>
#chart { max-width: 650px; margin: 35px auto; }
var options = { chart: { height: 380, width: "100%", type: "area", animations: { initialAnimation: { enabled: false } } }, series: [ { name: "Series 1", data: [ { x: "02-10-2017 GMT", y: 34 }, { x: "02-11-2017 GMT", y: 43 }, { x: "02-12-2017 GMT", y: 31 }, { x: "02-13-2017 GMT", y: 43 }, { x: "02-14-2017 GMT", y: 33 }, { x: "02-15-2017 GMT", y: 52 } ] } ], xaxis: { type: "datetime" } }; var chart = new ApexCharts(document.querySelector("#chart"), options); chart.render();