网站首页
百度ECharts
ECharts实例
ECharts入门
地图大全
ECharts官网
源代码:
点击运行 》
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Frappe Charts图表库搭建示例</title> <script src="/js/jquery-1.9.0.min.js"></script> <!-- 引入 frappe-charts.min.umd.js --> <script src="https://unpkg.com/frappe-charts@1.6.1/dist/frappe-charts.min.umd.js"></script> </head> <body> <div id="chart" ></div> <script type="text/javascript"> // 初始化方式略有区别 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: 350, colors: ['#7cd6fd', '#743ee2'] }) </script> </body> </html>
运行结果: