123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import ChartBar from '../../../src/chart/map/ChartDpMapCN/ChartDpMapCN.js';
- import dot from './data/dot';
- import line from './data/line';
- import heat from './data/heat';
- import area from './data/area';
- // import data1 from "../../../src/chart/map/ChartDpMapCN/data/line";
- // import data2 from "../../../src/chart/map/ChartDpMapCN/data/heat";
- // import data3 from "../../../src/chart/map/ChartDpMapCN/data/dot";
- let mapStyle = [{
- type: "map",
- id: "map",
- style: {
- backgroundColor:"#000000",
- oceanColor: "#4d6f9e",
- landColor: "#323f55",
- chinaColor: "#323e5a",
- textColor: "#8596bb"
- }
- },{
- type: "legend",
- id: "legend",
- style: {
- color: "skyblue",
- left: "20%",
- top: "70%"
- }
- }];
-
- let opt1=mapStyle.concat(line,area);
-
- let dotData=JSON.parse(JSON.stringify(dot));
- let bar = new ChartBar(document.getElementsByClassName('c1')[0],{});
-
- dotData[0].data.map(v=>{
- delete v.type;
- });
- setTimeout(()=>{
- bar.setOption(dotData);
- },4000);
- setTimeout(()=>{
- let ary=dot.concat([{
- type: "legend",
- id: "legend",
- style: {
- color: "#ff0000",
- left: "20%",
- top: "86%"
- }
- }]);
- bar.setOption(ary);
- },5000);
- window.addEventListener('resize', () => {
- bar.resize();
- });
|