echarts [Bug] 关于echart折线图只有2个点时的平滑曲线问题, smoothMonotone 无效

bz4sfanl  于 5个月前  发布在  Echarts
关注(0)|答案(4)|浏览(102)

Version

5.2

https://echarts.apache.org/examples/zh/editor.html?c=line-simple

Steps to Reproduce

option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 530],
type: 'line',
smooth: true,
smoothMonotone: 'x' // 该参数不生效
}
]
};

Current Behavior

折线图 只有2个点时平滑曲线问题,设置 smoothMonotone 不生效

Expected Behavior

旧版本支持,新版本不支持

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

yh2wf1be

yh2wf1be1#

@wangchaoren 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] Regarding the smooth curve problem when the echart line chart has only 2 points, smoothMonotone does not work

BODY

Version

5.2

https://echarts.apache.org/examples/zh/editor.html?c=line-simple

Steps to Reproduce

option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [150, 530],
type: 'line',
smooth: true,
smoothMonotone: 'x' // This parameter does not take effect
}
]
};

Current Behavior

Line chart When there are only 2 points for smoothing curve problems, setting smoothMonotone does not take effect

Expected Behavior

Older versions are supported, new versions are not

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

xxe27gdn

xxe27gdn2#

能不能快点解决啊

9q78igpj

9q78igpj3#

两个点的平滑曲线就是直线

6ljaweal

6ljaweal4#

旧版本为啥不是直线两点之间

相关问题