<!DOCTYPE html> <html lang="zh" > <head> <meta charset="UTF-8"> <title>单一值</title> </head> <body translate="no"> <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: "line" }, series: [ { name: "Series 1", data: [45, 52, 38, 45, 19, 33] } ], xaxis: { categories: [ "01 Jan", "02 Jan", "03 Jan", "04 Jan", "05 Jan", "06 Jan" ] } }; var chart = new ApexCharts(document.querySelector("#chart"), options); chart.render();