xwjune opened a new issue #14072:
URL: https://github.com/apache/echarts/issues/14072
### Version
5.0.1
### Steps to reproduce
import React, { useEffect } from 'react';
import * as echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/scatter';
import 'echarts/lib/component/tooltip';
const ScatterChart = () => {
useEffect(() => {
const option = {
tooltip: {
show: true,
},
grid: {
top: 20,
bottom: 20,
left: 20,
right: 20,
},
bmap: {
center: [120.13066322374, 30.240018034923],
zoom: 14,
roam: true,
},
series: [{
type: 'scatter',
coordinateSystem: 'bmap',
data: [{
name: '杭州',
symbolSize: 20,
value: [120.149835, 30.250613],
}],
itemStyle: {
color: 'blue'
},
}]
};
const myChart = echarts.init(document.getElementById('myChart'));
myChart.setOption(option);
}, []);
return (
<div style={{ width: 400, height: 400 }} id="myChart" />
);
};
export default ScatterChart;
### What is expected?
散点图不显示,地图空白,且已经引入<script
src="http://api.map.baidu.com/api?ak=myak"></script>,是不是还需要引入某些特定的组件搭配使用
### What is actually happening?
散点图显示
---
官网的案例代码不够完善,同样的代码拷贝下来,按需加载的时候,因为没有引入必要的组件,图表不一定正确显示,但这些例子里没有很好的体现
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]