Skip to content

漏斗图增加多个label #8616

@cuijian-dexter

Description

@cuijian-dexter

One-line summary [问题简述]

漏斗图需要左右都增加label的选项

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:4.1.0.rc2
  • Browser version [浏览器类型和版本]:chrome 63.0.3239.132(正式版本)
  • OS Version [操作系统类型和版本]:windows 10

Expected behaviour [期望结果]

漏斗图需要左右都增加label的选项,多方向的label

ECharts option [ECharts配置项]

option ={
            "title": {
                "text": "销售漏斗",
                "left": 16,
                "textStyle": {
                    "fontSize": 14
                },
                "show": false
            },
            "tooltip": {
                "trigger": "item",
                "axisPointer": {
                    "type": "shadow"
                },
                "formatterConfig": "sfaFunnelDimension"
            },
            "legend": {
                "data": ["初步接洽", "需求确定", "方案/报价", "谈判审核", "赢单"],
                "dataZoomBottom": "15px",
                "itemGap": 20,
                "left": "5%",
                "bottom": "15px",
                // "itemHeight": 10,
                "show": true,
                "normalBottom": "15px",
                "itemWidth": 10,
                "right": "5%",
                "type": "scroll",
                "pageIconColor": "#00aaef"
            },
            "series": [{
                "type": "funnel",
                "sort": "none",
                "minHeight": 15,
                // "minWidth": 2,
                "label": {
                    "normal": {
                        "show": true,
                        "formatter": "{b}",
                        "position": "leftTop",
                        "color": "#475059",
                        "verticalAlignment": true
                    },
                    "emphasis": {
                        "show": true,
                        "color": "#475059",
                        "textStyle": {
                            "fontSize": "18",
                            "fontWeight": "bold"
                        }
                    }
                },
                "labelLine": {
                    "lineStyle": {
                        "color": "#D9D9D9"
                    }
                },
                "itemStyle": {
                    "normal": {
                        "show": false,
                        "borderWidth": 0,
                        "borderColor": "#ccc"
                    },
                    "emphasis": {
                        "show": false,
                        "borderWidth": 0,
                        "borderColor": "#ccc"
                    }
                },
                "data": [{
                    "name": "初步接洽",
                    "value": [12, 13558, 11],
                    "itemStyle": {
                        "normal": {
                            "height": "100%"
                        }
                    }
                }, {
                    "name": "需求确定",
                    "value": [7, 10000, 5],
                    "itemStyle": {
                        "normal": {
                            "height": "0%"
                        }
                    }
                }, {
                    "name": "方案/报价",
                    "value": [3, 777, 5],
                    "itemStyle": {
                        "normal": {
                            "height": "0%"
                        }
                    }
                }, {
                    "name": "谈判审核",
                    "value": [1, 555, 4],
                    "itemStyle": {
                        "normal": {
                            "height": "0%"
                        }
                    }
                }, {
                    "name": "赢单",
                    "value": [1, 10, 1],
                    "itemStyle": {
                        "normal": {
                            "height": "0%"
                        }
                    }
                }, {
                    "name": "赢单",
                    "value": [1, 10, 1],
                    "itemStyle": {
                        "normal": {
                            "height": "auto"
                        }
                    },
                    "label": {
                        "show": false
                    },
                    labelLine: {
                        "show": false
                    }
                }],
                "top": "30%",
                "left": "25%",
                "bottom": "20%",
                "right": "25%"
            }],
            "dataTitle": {
                "leftTitle": {
                    "data": "1,355.87万",
                    "show": true,
                    "name": "总商机金额"
                },
                "rightTitle": {
                    "data": "135.59万",
                    "show": true,
                    "name": "预计赢单总金额"
                },
                "show": false,
                "styles": {
                    "top": "10%",
                    "left": "25%",
                    "bottom": "75%",
                    "right": "25%"
                },
                "formatConfig": "common"
            }
        }

Other comments [其他信息]

qq 20180629162013

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-featurestaleInactive for a long time. Will be closed in 7 days.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions