Version
5.5.0
Link to Minimal Reproduction
Steps to Reproduce
View Reproduction.
Look at legend for each chart.
Current Behavior
Legend for each chart includes lines from all three grids.
Expected Behavior
Each charts legend should only include the items actually in that sections chart.
So the first legend should only have A the second legend should have B, C and D, the third legend should have E.
Environment
- OS:MacOS
- Browser:Chrome
- Framework: NA
Any additional comments?
Attempting to combine multiple charts into single chart with single dataset. Attached is an html file that can be used to view the desired charts vs the currently generated chart when combined into a single chart.
t.txt
2条答案
按热度按时间uplii1fm1#
If you want your legends to contain specific items you have to configure them in data. Otherwise, how would echarts be supposed to know which legend is for which grid?
Example
bmvo0sr52#
Thanks the documentation is missing details for the legend and I thought I tried using data. In any case your example works for me so that is great.
The same way the code knows which series belongs to which grid. To my thinking would also apply to the legend. Each grid has its on legend those series assigned to each grid gets assigned to the corresponding legend.