echarts icon indicating copy to clipboard operation
echarts copied to clipboard

markLine不支持curveness吗?那么如何画曲线呢?

Open tuchongyang opened this issue 3 years ago • 5 comments

Version

5.3.0

Link to Minimal Reproduction

No response

Steps to Reproduce

series: [{ // 地图块的相关信息
                    name: '地域数量',
                    type: 'map',
                    // left: '20%',
                    top: '10%',
                    aspectScale: 1.1,
                    roam: false,
                    zoom: 1.1,
                    map: 'china',
                    label: {
                        show: false,
                        formatter:(params)=>{
                            const a = this.mapData.find(a=>a.name==params.name)
                            return a && params.name || ''
                        }
                    },
                    scaleLimit:{
                        min: .5,
                        max: 5
                    },
                    itemStyle:{
                        areaColor: '#045fb9',
                        borderWidth: 2,
                        borderColor: 'rgba(164,226,249,.3)',
                        opacity: .5
                    },
                    select:{
                        disabled: true
                    },
                    // geoIndex: 0, // 不可缺少,否则无tooltip 指示效果
                    data: datas,
                    markPoint:{
                        data: markTemp,
                        label:{
                            show: true,
                            formatter:(params)=>{
                                // const a = this.mapData.find(a=>a.name==params.name)
                                return params.name || ''
                            },
                            offset:[0,30]
                        },
                        itemStyle:{
                            opacity: .9
                        }
                    },
                    markLine:{
                        data: lineTemp,
                        symbol: 'none',
                        smooth: true,
                        lineStyle: {
                            curveness: .5,
                            smooth: true,
                        },
                        animationDelay:()=>{
                            return Math.random()*200
                        }
                    },
                }]

Current Behavior

添加markLine后,可以正常绘制线条,但是无论怎么设置都不能画出曲线,求教画曲线的方法。

Expected Behavior

希望markLine画出曲线

Environment

- OS:Windows 10
- Browser:Chrome 98.0
- Framework:Vue

Any additional comments?

No response

tuchongyang avatar Feb 11 '22 09:02 tuchongyang

@tuchongyang 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

Does markLine not support curveness? So how to draw curves?

echarts-bot[bot] avatar Feb 11 '22 09:02 echarts-bot[bot]

可以再增加一个系列画曲线?

Ovilia avatar Feb 14 '22 02:02 Ovilia

可以再增加一个系列画曲线?

可以加系列,但是画曲线的方法可以给个例子或者文档地址吗?

tuchongyang avatar Feb 14 '22 04:02 tuchongyang

@tuchongyang 参考 https://echarts.apache.org/zh/option.html#series-lines.lineStyle.curveness

pissang avatar Feb 14 '22 05:02 pissang

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Feb 14 '24 21:02 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Feb 21 '24 21:02 github-actions[bot]