自定义组件库-封装第三方图表,如echarts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 470B

123456789101112
  1. import chart from '../../src/chart/CustomChartBar/CustomChartBar.js';
  2. import Utils from '../utils.js';
  3. let config = new chart(document.querySelector('#container'), {getConfig:true}).getConfig();
  4. let current_chart = new chart(document.querySelector('#container'));
  5. let styleConfig = config.styleConfig;
  6. let dataConfig = config.dataConfig;
  7. console.log(123, Utils.parseStyle(styleConfig), dataConfig)
  8. current_chart.setOption(Utils.parseStyle(styleConfig), dataConfig);