数据可视化的步骤:
// 1.初始化实例对象,首先自定义一个容器
var myChart = echarts.init(document.querySelector(".box"));
// 2 指定相关配置
var option = { title: { text: "ECharts 入门示例" }, tooltip: {}, legend: { data: ["销量"] }, xAxis: { data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"] }, yAxis: {}, series: [ { name: "销量", type: "bar", data: [5, 20, 36, 10, 10, 20] } ] };
// 3. 把配置和数据给 实例对象
myChart.setOption(option);
运行结果:
标签:20,option,步骤,可视化,var,操作,data From: https://www.cnblogs.com/zhaolei0419/p/16807667.html