Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 当数据小数位数多于12位时纵轴刻度显示异常 #20332

Open
myan9527 opened this issue Sep 11, 2024 · 2 comments
Open

[Bug] 当数据小数位数多于12位时纵轴刻度显示异常 #20332

myan9527 opened this issue Sep 11, 2024 · 2 comments
Labels
bug pending We are not sure about whether this is a bug/new feature.

Comments

@myan9527
Copy link

Version

5.5.1

Link to Minimal Reproduction

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

Steps to Reproduce

option:

option = {
    "animation": false,
    "notMerge": true,
    "xAxis": [
        {
            "gridIndex": 0,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 1,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 2,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 3,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 4,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 5,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 6,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 7,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        },
        {
            "gridIndex": 8,
            "type": "category",
            "boundaryGap": false,
            "data": [
                "09-10 10:14:20",
                "09-10 22:14:20",
                "09-11 10:14:20"
            ]
        }
    ],
    "yAxis": [
        {
            "gridIndex": 0,
            "name": "VC_RGA_AR",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 1,
            "name": "VC_RGA_CO_N2",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 2,
            "name": "VC_RGA_H2",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 3,
            "name": "VC_RGA_H2O",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 4,
            "name": "VC_RGA_N2_O2_RATIO",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 5,
            "name": "VC_RGA_O2",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 6,
            "name": "VC_RGA_ORG",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 7,
            "name": "VC_RGA_ORG_AMU_MAX",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        },
        {
            "gridIndex": 8,
            "name": "VC_RGA_ORG_MAX",
            "nameTextStyle": {
                "color": "#202124"
            },
            "axisLabel": {}
        }
    ],
    "tooltip": {
        "trigger": "axis",
        "confine": true
    },
    "legend": {
        "data": [
            "VC_RGA_AR",
            "VC_RGA_CO_N2",
            "VC_RGA_H2",
            "VC_RGA_H2O",
            "VC_RGA_N2_O2_RATIO",
            "VC_RGA_O2",
            "VC_RGA_ORG",
            "VC_RGA_ORG_AMU_MAX",
            "VC_RGA_ORG_MAX"
        ],
        "selected": {}
    },
    "series": [
        {
            "name": "VC_RGA_AR",
            "type": "line",
            "xAxisIndex": 0,
            "yAxisIndex": 0,
            "smooth": false,
            "showSymbol": false,
            "color": "#4dc9f6",
            "large": true,
            "data": [
                "5.17e-12",
                "7.04e-13",
                "7.04e-13"
            ]
        },
        {
            "name": "VC_RGA_H2O",
            "type": "line",
            "xAxisIndex": 3,
            "yAxisIndex": 3,
            "smooth": false,
            "showSymbol": false,
            "color": "#537bc4",
            "large": true,
            "data": [
                "9.398732e-11",
                "9.661331e-11",
                "9.661331e-11"
            ]
        },
        {
            "name": "VC_RGA_CO_N2",
            "type": "line",
            "xAxisIndex": 1,
            "yAxisIndex": 1,
            "smooth": false,
            "showSymbol": false,
            "color": "#f67019",
            "large": true,
            "data": [
                "1.58985e-11",
                "1.833043e-11",
                "1.833043e-11"
            ]
        },
        {
            "name": "VC_RGA_N2_O2_RATIO",
            "type": "line",
            "xAxisIndex": 4,
            "yAxisIndex": 4,
            "smooth": false,
            "showSymbol": false,
            "color": "#acc236",
            "large": true,
            "data": [
                "3.0144",
                "3.380387",
                "3.380387"
            ]
        },
        {
            "name": "VC_RGA_H2",
            "type": "line",
            "xAxisIndex": 2,
            "yAxisIndex": 2,
            "smooth": false,
            "showSymbol": false,
            "color": "#f53794",
            "large": true,
            "data": [
                "7.755859e-12",
                "1.378274e-11",
                "1.378274e-11"
            ]
        },
        {
            "name": "VC_RGA_O2",
            "type": "line",
            "xAxisIndex": 5,
            "yAxisIndex": 5,
            "smooth": false,
            "showSymbol": false,
            "color": "#166a8f",
            "large": true,
            "data": [
                "5.274184e-12",
                "5.422583e-12",
                "5.422583e-12"
            ]
        },
        {
            "name": "VC_RGA_ORG",
            "type": "line",
            "xAxisIndex": 6,
            "yAxisIndex": 6,
            "smooth": false,
            "showSymbol": false,
            "color": "#00a950",
            "large": true,
            "data": [
                "4.181124e-12",
                "4.855279e-12",
                "4.855279e-12"
            ]
        },
        {
            "name": "VC_RGA_ORG_AMU_MAX",
            "type": "line",
            "xAxisIndex": 7,
            "yAxisIndex": 7,
            "smooth": false,
            "showSymbol": false,
            "color": "#58595b",
            "large": true,
            "data": [
                "55",
                "55",
                "55"
            ]
        },
        {
            "name": "VC_RGA_ORG_MAX",
            "type": "line",
            "xAxisIndex": 8,
            "yAxisIndex": 8,
            "smooth": false,
            "showSymbol": false,
            "color": "#8549ba",
            "large": true,
            "data": [
                "2.637731e-13",
                "6.531946e-13",
                "6.531946e-13"
            ]
        }
    ],
    "axisPointer": {
        "link": {
            "xAxisIndex": "all"
        }
    },
    "grid": [
        {
            "left": 100,
            "right": 40,
            "top": 60,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 270,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 480,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 690,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 900,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 1110,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 1320,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 1530,
            "height": 150
        },
        {
            "left": 100,
            "right": 40,
            "top": 1740,
            "height": 150
        }
    ],
    "dataZoom": [
        {
            "type": "slider",
            "filterMode": "weakFilter",
            "showDataShadow": true,
            "bottom": 20,
            "height": 10,
            "handleSize": "200%",
            "moveHandleSize": 1,
            "borderColor": "none",
            "labelFormatter": "",
            "xAxisIndex": [
                0,
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8
            ],
            "start": 0,
            "end": 100,
            "handleIcon": "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z"
        },
        {
            "type": "inside",
            "filterMode": "weakFilter",
            "xAxisIndex": [
                0,
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8
            ]
        }
    ]
}

Current Behavior

image

Expected Behavior

把大于13位的数值改为11位,y轴刻度显示正常:
image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@myan9527 myan9527 added the bug label Sep 11, 2024
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Sep 11, 2024
Copy link

echarts-bot bot commented Sep 11, 2024

@myan9527 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] When the number of decimal places in the data exceeds 12, the vertical axis scale displays abnormally

@helgasoft
Copy link

good candidate for max:'dataMax' - Demo
Also consider Y-axis labels in much shorter scientific notation.
📌 please close issue if problem solved.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants