MCPcopy
hub / github.com/baidu/amis / loadChartMapData

Method loadChartMapData

packages/amis/src/renderers/Chart.tsx:310–326  ·  view source on GitHub ↗
(callBackFn?: () => void)

Source from the content-addressed store, hash-verified

308 }
309
310 async loadChartMapData(callBackFn?: () => void) {
311 const {env, data} = this.props;
312 let {mapName, mapURL} = this.props;
313 if (mapURL && mapName && (window as any).echarts) {
314 if (isPureVariable(mapName)) {
315 mapName = resolveVariableAndFilter(mapName, data);
316 }
317 const mapGeoResult = await env.fetcher(mapURL as Api, data);
318 if (!mapGeoResult.ok) {
319 console.warn('fetch map geo error ' + mapURL);
320 }
321 (window as any).echarts.registerMap(mapName!, mapGeoResult.data);
322 }
323 if (callBackFn) {
324 callBackFn();
325 }
326 }
327
328 async handleClick(ctx: object) {
329 const {onAction, clickAction, data, dispatchEvent} = this.props;

Callers 2

componentDidUpdateMethod · 0.95
refFnMethod · 0.95

Calls 2

isPureVariableFunction · 0.90
resolveVariableAndFilterFunction · 0.90

Tested by

no test coverage detected