echarts [Bug] the axisLine does not work in v5 when one axis is category type and the other axis is time type. While the v4 version can take effect.

oaxa6hgo  于 5个月前  发布在  Echarts
关注(0)|答案(6)|浏览(57)

Version

5.3.0(actually all 5.x versions have this bug)

No response

Steps to Reproduce

copy this code to create a gantt chart, when version is 4.+ the xAxis.axisLine can take effect, while it does not work in version 5.+, with the same code.

option = {
    "legend": {
        "show": true,
        "pageIconSize": 12,
        "padding": 5,
        "itemGap": 10,
        "itemWidth": 20,
        "itemHeight": 20,
        "textStyle": {
            "padding": 1,
            "color": "#999999"
        },
        "right": 50,
        "pageIconColor": "#2f4554",
        "pageIconInactiveColor": "#aaa",
        "type": "scroll",
        "data": []
    },
    "grid": {
        "left": 60,
        "right": 50,
        "bottom": 50,
        "top": 50,
        "containLabel": false
    },
    "xAxis": {
        "show": true,
        "name": "",
        "nameTextStyle": {
            "color": "#999999"
        },
        "type": "time",
        "boundryGap": false,
        "axisTick": {
            "show": false
        },
        "axisLine": {
            "lineStyle": {
                "color": "#C089D9",
                "width": 3,
                "type": "dashed"
            },
            "onZero": false,
            "symbol": [
                "circle",
                "rect"
            ],
            "symbolSize": [
                1,
                2
            ],
            "symbolOffset": [
                2,
                3
            ]
        },
        "splitLine": {
            "show": true,
            "lineStyle": {
                "width": 1,
                "color": "#E9E9E9",
                "type": "solid"
            }
        },
        "axisLabel": {
            "textStyle": {
                "color": "#999999"
            },
            "rotate": 0,
            "hideOverlap": true,
            "showMaxLabel": true,
            "formatter": {
                "year": "{MM}-{dd}\n{yyyy}",
                "month": "{MM}-{dd}\n{yyyy}",
                "day": "{MM}-{dd}\n{yyyy}",
                "hour": "{HH}:{mm}",
                "minute": "{HH}:{mm}",
                "second": "{HH}:{mm}:{ss}",
                "millisecond": "{MM}-{dd}\n{yyyy}",
                "none": "{MM}-{dd}\n{yyyy}"
            }
        },
        "position": "bottom",
        "inverse": false,
    },
    "yAxis": {
        "show": true,
        "nameGap": 20,
        "axisLine": {
            "show": true,
            "lineStyle": {
                "color": "#D9E0E6"
            }
        },
        "nameTextStyle": {
            "color": "#999999"
        },
        "type": "category",
        "inverse": true,
        "axisTick": {
            "show": false
        },
        "axisLabel": {
            "interval": 0,
            "textStyle": {
                "color": "#999999"
            }
        },
        "splitLine": {
            "show": true,
            "lineStyle": {
                "width": 1,
                "color": "#E9E9E9",
                "type": "solid"
            }
        },
        "data": [
            "task 1",
            "task 2",
            "task 3",
            "task 4",
            "task 5",
            "task 6",
            "task 7",
            "task 8",
            "task 9"
        ],
        "name": "",
        "position": "left",
    },
    "tooltip": {
        "extraCssText": "z-index: 10000;",
        "confine": true,
        "borderWidth": 0,
        "position": "top",
        "trigger": "axis",
        "axisPointer": {
            "type": "none"
        },
        "backgroundColor": "rgba(34, 34, 34, 0.7)"
    },
    "animation": false,
    "series": [
        {
            "name": "Placeholder",
            "type": "custom",
            "encode": {
                "x": [
                    1,
                    2
                ],
                "y": [
                    0
                ]
            },
            "itemStyle": {
                "color": "#3ca0ed"
            },
            "data": [
                [
                    "task 1",
                    "2020-11-30T16:00:00.000Z",
                    "2020-12-01T16:00:00.000Z"
                ],
                [
                    "task 2",
                    "2020-12-01T16:00:00.000Z",
                    "2020-12-02T16:00:00.000Z"
                ],
                [
                    "task 3",
                    "2020-12-02T16:00:00.000Z",
                    "2020-12-03T16:00:00.000Z"
                ],
                [
                    "task 4",
                    "2020-12-03T16:00:00.000Z",
                    "2020-12-04T16:00:00.000Z"
                ],
                [
                    "task 5",
                    "2020-12-04T16:00:00.000Z",
                    "2020-12-05T16:00:00.000Z"
                ],
                [
                    "task 6",
                    "2020-12-05T16:00:00.000Z",
                    "2020-12-06T16:00:00.000Z"
                ],
                [
                    "task 7",
                    "2020-12-06T16:00:00.000Z",
                    "2020-12-07T16:00:00.000Z"
                ],
                [
                    "task 8",
                    "2020-12-07T16:00:00.000Z",
                    "2020-12-08T16:00:00.000Z"
                ],
                [
                    "task 9",
                    "2020-12-08T16:00:00.000Z",
                    "2020-12-09T16:00:00.000Z"
                ]
            ]
        }
    ],
};

Current Behavior

My chart needs to display xAxis.axisLine configuration when xAxis.type = 'time', and yAxis.type = 'category'.
in echart4.+ it can work, but in v5.+ it does not work.

v4.+

v5.+

Expected Behavior

I need the same code has the same effect in v4.+ and v5.+

Environment

- OS: windows10
- Browser:Chrome 99.0.4844.74
- Framework:Vue@2

Any additional comments?

No response

cbeh67ev

cbeh67ev1#

Could not reproduce in 5.4.1
https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoW7YCIA2BTA5rtACaYBcyaG1mAzgBbADu5sYATgK64A0V16TCACGhAJIBjGAGUIAL1ysAjACY-AjEOHFiEaPlYBWdRqwQwuALYBxYSGUAGExszmrAdQjEw9Viqf8Aq4WlgASuBD49GB-AaZYFgAeYNJgAJ54rKjxNCI6egYUSs45mFLYwOysmADEAJwNjZiB1AC-JTTskdFGcaZa4lLQAMLAFVUUtSoAZgAshoazmB2aIoMwYtDCEpAAbrij49U1wqfLLZrpIIqTtBLsY9jn8ZjEwmDCrADaALqB7YFMPguqQKNl-nhpjEKAA2PouLpRaGwQzwoIAI2AYDAwEsvRWghx9goqIJWCGHz0ABlhOjcE8KNNhNhaLh_iVMIkAIKJCC0LIXQQMZisDjcMmYLaWG5YZ79KW4AAquGSqQyMvBOXJY0qx0aTUFsABLyuMswkGlcpcmM4JHYaVsxNgTJZvENmGEvNoiogEgA1gKtULGCxGczWYbjf1PXyqXoNYaaNh42rMmDE_1yrrJjVhg4ABx1AAidStQcETC8PlYAGYySa0tdqm8GLhSBn0FGtZgYAAtXAPVgu1n1zS0NKWTEM2BfDtBCQQdgSTKjhG4HbNcs_VdYceTsayBTfOfUYonjAqOfbud0CdTgDy02mrORs_L1DU5_QNavkYltBAZMwDjaAE3LOgQ1FLg3XA5NQNTMD3wrKtfCKHcaCzCYsBqABROo8LwstwNNapaDGLxNyDVo_3dGNaBpOlp01UokhSdI00oJDBEwvV9VLOcu1KB4PgsVg0ReegvFwe99nYbA7Cg8Ub2FJg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kUHROccRmCC6YE3pGTWnZIcLkiZWApkOFmH0gZ7SKllSqWImphgOmaBWWs2Z_SyntLyZ0hpfimmGHWWchZUScgxPfDsiGNS05LMwCs25JyNkPIuYcq5qSHAwjuW0h5WyjGfJqVnAFkygVNNBb8-5izBHwsad0jOYL5leMhVxV574EmwDznC5ZCLMXYsiaSr55LAn5kpZsoZ2zoUFwOei653T6XIvBaitFNKMWBLqAyiFIjfyo0CNeVok8gA

b91juud3

b91juud32#

Could not reproduce in 5.4.1https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoW7YCIA2BTA5rtACaYBcyaG1mAzgBbADu5sYATgK64A0V16TCACGhAJIBjGAGUIAL1ysAjACY-AjEOHFiEaPlYBWdRqwQwuALYBxYSGUAGExszmrAdQjEw9Viqf8Aq4WlgASuBD49GB-AaZYFgAeYNJgAJ54rKjxNCI6egYUSs45mFLYwOysmADEAJwNjZiB1AC-JTTskdFGcaZa4lLQAMLAFVUUtSoAZgAshoazmB2aIoMwYtDCEpAAbrij49U1wqfLLZrpIIqTtBLsY9jn8ZjEwmDCrADaALqB7YFMPguqQKNl-nhpjEKAA2PouLpRaGwQzwoIAI2AYDAwEsvRWghx9goqIJWCGHz0ABlhOjcE8KNNhNhaLh_iVMIkAIKJCC0LIXQQMZisDjcMmYLaWG5YZ79KW4AAquGSqQyMvBOXJY0qx0aTUFsABLyuMswkGlcpcmM4JHYaVsxNgTJZvENmGEvNoiogEgA1gKtULGCxGczWYbjf1PXyqXoNYaaNh42rMmDE_1yrrJjVhg4ABx1AAidStQcETC8PlYAGYySa0tdqm8GLhSBn0FGtZgYAAtXAPVgu1n1zS0NKWTEM2BfDtBCQQdgSTKjhG4HbNcs_VdYceTsayBTfOfUYonjAqOfbud0CdTgDy02mrORs_L1DU5_QNavkYltBAZMwDjaAE3LOgQ1FLg3XA5NQNTMD3wrKtfCKHcaCzCYsBqABROo8LwstwNNapaDGLxNyDVo_3dGNaBpOlp01UokhSdI00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kGxzpHJJ-SHDWMKQ0kpYSPE5LqTQApASHA1haQ4LJ5SRGVKkUHROccRmCC6YE3pGTWnZIcLkiZWApkOFmH0gZ7SKllSqWImphgOmaBWWs2Z_SyntLyZ0hpfimmGHWWchZUScgxPfDsiGNS05LMwCs25JyNkPIuYcq5qSHAwjuW0h5WyjGfJqVnAFkygVNNBb8-5izBHwsad0jOYL5leMhVxV574EmwDznC5ZCLMXYsiaSr55LAn5kpZsoZ2zoUFwOei653T6XIvBaitFNKMWBLqAyiFIjfyo0CNeVok8gA

These configuration items do not take effect because the x axis is expected to form a purple dot axis.

v5.4.1

v4.+

pxy2qtax

pxy2qtax3#

Sorry, I have misunderstanded, It seems like a bug to me

63lcw9qa

63lcw9qa4#

yes, serious bug in axisLine.
Demo Code - see comments

niwlg2el

niwlg2el5#

Sorry, I have misunderstanded, It seems like a bug to me

In which version can this problem be solved? Because it affects our product characteristics.

6yoyoihd

6yoyoihd6#

Sorry, I have misunderstanded, It seems like a bug to me

Hi, is this problem solved? In which version will it be solved?

相关问题