How to use the registerMap function from echarts
Find comprehensive JavaScript echarts.registerMap code examples handpicked from public code repositorys.
49 50 51 52 53 54 55 56 57 58
this.echarts = Echarts.init(this.canvas); let option = this.setSeriesCallBack(); //为地图图表注册地图geo json数据 if (this.props.onChangeRegion && this.props.onChangeRegion instanceof Function) { const callback = (regionName: string, mapJson: any) => { Echarts.registerMap(regionName, mapJson); //设置加载地图后的个性化回调方法 if (this.props.setOptionAfterLoadMap && this.props.setOptionAfterLoadMap instanceof Function) { option = this.props.setOptionAfterLoadMap(option, mapJson); }
1
7
1
148 149 150 151 152 153 154 155 156 157
} }, events: { 'dist-ready-load': (tweetdata) => { $.get('/dist/assets/json/china.json', function (chinaJson) { echarts.registerMap('china', chinaJson) var statics = {} if (typeof tweetdata === 'string') { tweetdata = JSON.parse(tweetdata) }
0
4
4
29 30 31 32 33 34 35 36 37 38
fetch( 'https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/Map_of_Iceland.svg' ) .then(response => response.text()) .then(svg => { echarts.registerMap('iceland_svg', { svg: svg }); option = { geo: { map: 'iceland_svg', left: 0,
126
1
0
echarts.init is the most popular function in echarts (114 examples)