信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import ChartBar from '../../../src/chart/map/ChartDpMapCN/ChartDpMapCN.js';
  2. import dot from './data/dot';
  3. import line from './data/line';
  4. import heat from './data/heat';
  5. import area from './data/area';
  6. // import data1 from "../../../src/chart/map/ChartDpMapCN/data/line";
  7. // import data2 from "../../../src/chart/map/ChartDpMapCN/data/heat";
  8. // import data3 from "../../../src/chart/map/ChartDpMapCN/data/dot";
  9. let mapStyle = [{
  10. type: "map",
  11. id: "map",
  12. style: {
  13. backgroundColor:"#000000",
  14. oceanColor: "#4d6f9e",
  15. landColor: "#323f55",
  16. chinaColor: "#323e5a",
  17. textColor: "#8596bb"
  18. }
  19. },{
  20. type: "legend",
  21. id: "legend",
  22. style: {
  23. color: "skyblue",
  24. left: "20%",
  25. top: "70%"
  26. }
  27. }];
  28. let opt1=mapStyle.concat(line,area);
  29. let dotData=JSON.parse(JSON.stringify(dot));
  30. let bar = new ChartBar(document.getElementsByClassName('c1')[0],{});
  31. dotData[0].data.map(v=>{
  32. delete v.type;
  33. });
  34. setTimeout(()=>{
  35. bar.setOption(dotData);
  36. },4000);
  37. setTimeout(()=>{
  38. let ary=dot.concat([{
  39. type: "legend",
  40. id: "legend",
  41. style: {
  42. color: "#ff0000",
  43. left: "20%",
  44. top: "86%"
  45. }
  46. }]);
  47. bar.setOption(ary);
  48. },5000);
  49. window.addEventListener('resize', () => {
  50. bar.resize();
  51. });