Version
5.2.1
Link to Minimal Reproduction
- No response*
Steps to Reproduce
option = {
tooltip: {
trigger: 'axis',
},
"legend": {
},
"dataset": {
"source": [
[
"product",
"a",
"b",
],
["2020-10", 5.28, 0],
["2020-11", 5.72, 0],
["2020-12", 6.95, 0],
["2021-01", 8.7, 0],
["2021-02", 11.64, 0],
["2021-03", 11.93, 10.32],
["2021-04", 12.04, 6.79],
["2021-05", 10.47, 5.67],
]
},
"xAxis": { "type": "category",},
"yAxis": {},
"series": [
{
"type": "line",
"smooth": true,
"areaStyle": {},
"stack": "total"
},
{
"type": "line",
"smooth": true,
"areaStyle": {},
"stack": "total"
},
],
}
Current Behavior
两条曲线的面积出现重叠。绿色曲线在圈起来的地方的值都是0,按理说不应该重叠
Expected Behavior
两条曲线的面积
Environment
- OS: mac osx
- Browser: chrome
- Framework: vue
Any additional comments?
- No response*
3条答案
按热度按时间u3r8eeie1#
删除
stack: 'total'
配置项再看看是不是你想要的?lnxxn5zx2#
删除
stack: 'total'
配置项再看看是不是你想要的?这个不行,其实我想同时实现堆叠和smooth的效果,
h79rfbju3#
似乎是平滑计算导致的问题,试试设置
smoothMonotone
为x
。