echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] polar使用visualMap时,只有折线标记的图形颜色正常变化

Open suzuyong opened this issue 2 years ago • 1 comments

Version

5.3.3

Link to Minimal Reproduction

No response

Steps to Reproduce

const data = []; for (let i = 0; i <= 50; i++) { let theta = (i / 50) * 360; let r = 5 * (1 + Math.sin((theta / 180) * Math.PI)); data.push([r, theta]); } option = { title: { text: 'Two Value-Axes in Polar' }, legend: { data: ['line'] }, polar: {}, tooltip: { trigger: 'axis', axisPointer: { type: 'cross' } }, angleAxis: { type: 'value', startAngle: 0 }, radiusAxis: {}, visualMap: { top: 50, right: 10, dimension: 0, pieces: [ { gt: 0, lte: 2, color: '#93CE07' }, { gt: 2, lte: 4, color: '#FBDB0F' }, { gt: 4, lte: 6, color: '#FC7D02' }, { gt: 6, lte: 8, color: '#FD0100' }, { gt: 8, lte: 10, color: '#AA069F' }, { gt: 10, color: '#AC3B2A' } ], outOfRange: { color: '#999' } }, series: [ { coordinateSystem: 'polar', name: 'line', type: 'line', data: data } ] };

Current Behavior

line-polar

Expected Behavior

折线和标记的图形颜色都能根据visualMap的设置正常变化。

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

suzuyong avatar Aug 10 '22 02:08 suzuyong

@suzuyong 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. 🤗

TRANSLATED

TITLE

[Bug] When polar uses visualMap, only the graph color of polyline markers changes normally

echarts-bot[bot] avatar Aug 10 '22 02:08 echarts-bot[bot]

After diving into the code, I found that gradient color is not supported for polar lines and visualMaps use gradient to implement. It is not easy to support gradient for polar lines because linear gradient is tricky in the polar system so we intentionally didn't support it in the polar line series.

Although the visualMap for polar line series may not be implemented in a near future, you can follow #17138 to see if this requirement can be fulfilled with that issue.

Ovilia avatar Aug 12 '22 09:08 Ovilia