apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.63k stars 19.61k forks source link

Missing symbol border in legend for scatter series #9689

Closed kanchev closed 3 years ago

kanchev commented 5 years ago

General Questions

Issue Type

Issue Details

Symbol's border is not rendered at all in the legend for scatter series with itemStyle set with color, borderColor and borderWidth properties.

Expected Behavior

The borderColor and borderWidth properties are picked up from series itemStyle and rendered correctly in the legend.

Current Behavior

The border is rendered property in the grid but it's missing in the legend. Only the color property is used to fill the symbol.

Online Example

option = { xAxis: {}, yAxis: {}, legend: { show: true, orient: 'vertical' }, series: [{ symbolSize: 20, data: [ [1, 1] ], type: 'scatter', name: 'missing border', itemStyle: { color: 'green', borderColor: 'red', borderWidth: 5, } }] };

Paste this here: https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-simple

Topics

Anything Else We Need to Know

Environment

pissang commented 5 years ago

Currently legend only display color and symbol of series

kanchev commented 5 years ago

Are you planning to support also borderColor for the legend?

Btw from technical point of view I assumed that the same logic is used to render symbols for the series and for the legend.

pissang commented 5 years ago

Yes it's a very common request. We will think about adding more visual properties in the legend. Thanks @kanchev

huanggm commented 4 years ago

Series symbol is none, but legend symbol still rendered.

Ovilia commented 3 years ago

Fixed in #14497, released in 5.1.0.