echarts-bot[bot] commented on issue #16428: URL: https://github.com/apache/echarts/issues/16428#issuecomment-1021033500
@Fxiao1 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** The first and second colors of the type mix of "series" are always the same **BODY** ### Version 4.2.1 ### Link to Minimal Reproduction _No response_ ### Steps to Reproduce 1. Open [this address](https://echarts.apache.org/examples/zh/editor.html?c=dataset-link) 2. Copy the following configuration into it ````js setTimeout(function () { option = { legend: {}, tooltip: { trigger: 'axis', showContent: true }, dataset: [ {source:[ ['title','February 2021','March 2021','April 2021','May 2021','June 2021','July 2021','2021 August','September 2021','October 2021','November 2021','December 2021','January 2022'], ['Number',63,63,65,25,137,4,26,15,21,60,80,42], ]},{ source:[ ['title','February 2021','March 2021','April 2021','May 2021','June 2021','July 2021','2021 August','September 2021','October 2021','November 2021','December 2021','January 2022'], ['Male',53,26,49,18,123,0,23,8,21,12,26,21], ['Female', 10, 37, 16, 7, 14, 4, 3, 7, 0, 48, 54, 21], ] }, { source:[ ['title','February 2021','March 2021','April 2021','May 2021','June 2021','July 2021','2021 August','September 2021','October 2021','November 2021','December 2021','January 2022'], ['Less than or equal to 20 years old', 56, 44, 29, 17, 87, 0, 9, 7, 15, 17, 16, 7], ['21 to 40', 5, 4, 35, 0, 32, 4, 12, 6, 3, 25, 30, 29], ['Over 40 years old', 2, 15, 1, 8, 18, 0, 5, 2, 3, 18, 34, 6] ] }, ], xAxis: { type: 'category' }, yAxis: { gridIndex: 0 }, grid: { top: '55%' }, series: [ { type: 'line', smooth: true, seriesLayoutBy: 'row', emphasis: { focus: 'series' }, datasetIndex:0 },{ type: 'pie', id: 'pie', radius: '30%', center: ['25%', '25%'], emphasis: { focus: 'self' }, label: { formatter: '{b}: {@February 2021} ({d}%)' }, encode: { itemName: 'title', value: 'February 2021', tooltip: 'February 2021' }, datasetIndex: 1 },{ name:'sex ratio', type: 'pie', id: 'pie2', radius: '30%', center: ['75%', '25%'], emphasis: { focus: 'self' }, label: { formatter: '{b}: {@February 2021} ({d}%)' }, encode: { itemName: 'title', value: 'February 2021', tooltip: 'February 2021' }, datasetIndex: 2 } ] }; myChart.on('updateAxisPointer', function (event) { const xAxisInfo = event.axesInfo[0]; if (xAxisInfo) { const dimension = xAxisInfo.value + 1; myChart.setOption({ series: [ { id: 'pie', label: { formatter: '{b}: {@[' + dimension + ']} ({d}%)' }, encode: { value: dimension, tooltip: dimension } }, { id: 'pie2', label: { formatter: '{b}: {@[' + dimension + ']} ({d}%)' }, encode: { value: dimension, tooltip: dimension } } ] }); } }); myChart.setOption(option); }); ```` 3. You can see that the color of the line chart and the pie chart of gender are exactly the same ### Current Behavior echarts seems to assign colors to the first series and the second series as the same series ### Expected Behavior Able to distinguish the first series from the second series and assign different colors to them ### Environment ````markdown - OS:windows 10 - Browser:chrome 97.0.4692.99 - 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]
