echarts-bot[bot] commented on issue #18219:
URL: https://github.com/apache/echarts/issues/18219#issuecomment-1411522031
@githubzyl It seems you are not using English, I've helped translate the
content automatically. To make your issue understood by more people and get
helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] Why can't the scatterplot show the legend? I set up the legend and I
can't show it
**BODY**
### Version
5.4.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
option = {
xAxis: {},
yAxis: {},
legend: {
data: ['Class One', 'Class Two', 'Class Three'],
textStyle: {
fontSize: 12
}
},
label: {
show: true,
position: 'right',
formatter: '{b}'
},
series: [
{
name:'yiban',
symbolSize: 10,
data: [
{
name: 'Agriculture, Forestry, Animal Husbandry, Fishery',
itemStyle: {
color: 'red'
},
value: [1, 33612]
},
{
name: 'Mining',
itemStyle: {
color: 'red'
},
value: [2, 60544]
},
{
name: 'Manufacturing',
itemStyle: {
color: 'red'
},
value: [3, 59470]
},
{
name: 'Electricity, heat, gas and water production and supply
industry',
itemStyle: {
color: 'red'
},
value: [4, 83863]
},
{
name: 'Construction Industry',
itemStyle: {
color: 'red'
},
value: [5, 52082]
},
{
name: 'Wholesale and retail trade',
itemStyle: {
color: 'red'
},
value: [6, 65061]
},
{
name: 'Transportation, storage and postal services',
itemStyle: {
color: 'red'
},
value: [7, 73650]
},
{
name: 'Accommodation and Catering Industry',
itemStyle: {
color: 'blue'
},
value: [8, 43382]
},
{
name: 'Information Transmission, Software and Information
Industry',
itemStyle: {
color: 'blue'
},
value: [9, 122478]
},
{
name: 'financial industry',
itemStyle: {
color: 'blue'
},
value: [10, 117418]
},
{
name: 'Real Estate',
itemStyle: {
color: 'blue'
},
value: [11, 65497]
},
{
name: 'Leasing and Business Services',
itemStyle: {
color: 'blue'
},
value: [12, 76782]
},
{
name: 'Scientific research and technical services',
itemStyle: {
color: 'blue'
},
value: [13, 96638]
},
{
name: 'Water conservancy, environment and public facilities
management industry',
itemStyle: {
color: 'yellow'
},
value: [14, 47750]
},
{
name: 'Resident services, repairs and other services',
itemStyle: {
color: 'yellow'
},
value: [15, 47577]
},
{
name: 'Education',
itemStyle: {
color: 'yellow'
},
value: [16, 74498]
},
{
name: 'Health and Social Work',
itemStyle: {
color: 'yellow'
},
value: [17, 80026]
},
{
name: 'Culture, Sports and Entertainment',
itemStyle: {
color: 'yellow'
},
value: [18, 79875]
},
{
name: 'Public Administration, Social Security and Social
Organization',
itemStyle: {
color: 'yellow'
},
value: [19, 70959]
}
],
type: 'scatter'
}
]
};
### Current Behavior
Legend is set in the above option but cannot be displayed
### Expected Behavior
I want to be able to display legend legend data set manually
### Environment
```markdown
- OS:
-Browser:Chrome
- Framework:
```
### Any additional comments?
_No response_
</details>
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]