echart2.0Vs echarts3.0

    xiaoxiao2021-11-21  95

    1.echart2.0的用法

       1>路径配置

       // 路径配置     require.config({         paths: {             echarts: '@Url.Content("~/Areas/EnvironmentalMonitor/Scripts/ECharts")'         }     });

       2>绑定图表

            require(['echarts',        'echarts/chart/bar', // 使用柱状图就加载bar模块,按需加载         'echarts/chart/line'         ]      , function (ec) {          // 基于准备好的dom,初始化echarts图表          var myChart = ec.init(document.getElementById('main'));          var option = {};          // 为echarts对象加载数据          myChart.setOption(option);          if (returnSeries(key).length == 0) {              myChart.showLoading({                  text: "暂无数据",                  effect: 'bubble',                  textStyle: {                      fontSize: 30                  }              })          }      }        );

    2.echart3.0的用法

       var myChart;     myChart = echarts.init(document.getElementById(container));

    转载请注明原文地址: https://ju.6miu.com/read-678431.html

    最新回复(0)