Skip to content

刻度标签进行旋转之后,能否自适应,以便刻度标签不被遮住。 #6074

@suifengfengye

Description

@suifengfengye

One-line summary [问题简述]

刻度标签进行旋转之后,能否自适应,以便刻度标签不被遮住。

image

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.5.4
  • Browser version [浏览器类型和版本]:chrome 59.0.3071.104
  • OS Version [操作系统类型和版本]: windows 7

Expected behaviour [期望结果]

image

ECharts option [ECharts配置项]

option = {
    "tooltip":{
        "show":true,
        "textStyle":{
            "color":"#3d464a"
        },
        "backgroundColor":"#fff",
        "extraCssText":"box-shadow: 0 2px 12px rgba(49, 114, 149, 0.3);",
        "trigger":"axis"
    },
    "grid":{
        "left":0,
        "right":"5%",
        "top":"5%",
        "bottom": 0,
        "containLabel":true
    },
    "xAxis":[
        {
            "type":"value",
            "axisTick":{
                "show":false
            },
            "axisLine":{
                "show":false
            },
            "axisLabel":{
                "textStyle":{
                    "color":"#A4A8AB"
                },
                "rotate":20
            },
            "splitLine":{
                "show":true,
                "lineStyle":{
                    "type":"dotted",
                    "color":"#e6e8ee"
                }
            }
        }
    ],
    "yAxis":[
        {
            "axisTick":{
                "show":false
            },
            "axisLine":{
                "lineStyle":{
                    "color":"#A4A8AB"
                }
            },
            "axisLabel":{
                "textStyle":{
                    "color":"#A4A8AB"
                }
            },
            "type":"category",
            "data":[
                "龙锦洲",
                "高金锁",
                "陈浩如",
                "李大龙",
                "杨明东",
                "王刚",
                "薛春霞",
                "徐屹",
                "李晓辉",
                "颜双云"
            ]
        }
    ],
    "series":[
        {
            "name":"当期销售金额",
            "type":"bar",
            "data":[
                7686230.32,
                21002736,
                25022540.1,
                26180190.4,
                30693198.6,
                34021845.39,
                38502818.55,
                40637447.5,
                51430421.26,
                54323927.5
            ],
            "yAxisIndex":0,
            "barMaxWidth":"40%",
            "label":{
                "normal":{
                    "show":false
                }
            },
            "itemStyle":{
                "emphasis":{
                    "opacity":0.8
                }
            }
        }
    ],
    "color":[
        "#3bbaff",
        "#00CFFC",
        "#00F1DF",
        "#008AFB",
        "#C0E77A",
        "#E7D971",
        "#94D0C3",
        "#90BAD6"
    ]
}

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive 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