Skip to content Skip to sidebar Skip to footer

Baidu's Echarts - Filling Up Space Between 2 Lines

I would like to find an approach on how to draw 2 lines in ECharts and fill up the space between them like this: So that each line has it's own color. Depending on order of lines

Solution 1:

I've used areaStyle to fill the area between the axisLine and the data. I would try to solve this issue by adding the green/yellow areaStyle to the green series, adding a pink areaStyle to the red series, and then adding a white areaStyle to a new series made up from the min values from the other two series. Combined with a lineStyle with a width of 0, you could mostly achieve the look in the sketch, however, the minimum series fill would probably also obscure the interior grid lines.


Post a Comment for "Baidu's Echarts - Filling Up Space Between 2 Lines"