<script src="/dist/frappe-charts.min.umd.js"></script> <script> // 初始化方式略有区别 const data = { labels: ["周一", "周二", "周三", "周四","周五", "周六", "周日"], datasets: [ { name: "用户注册数", chartType: "bar", values: [250, 400, 300, 350, 800, 520, 170] }, { name: "订单量", chartType: "line", values: [2500, 5000, 3100, 1589, 1823, 3245, 2787] } ] } const chart = new frappe.Chart("#chart", { title: "图表名称", data: data, type: 'axis-mixed', height: 250, colors: ['#7cd6fd', '#743ee2'] }) </script>