Skip to content

[Bug]: 图例展示异常 #7250

@lxfu1

Description

@lxfu1

Describe the bug / 问题描述

Image

图例缺失

{
  const config = {
    "type": "view",
    "scale": {},
    "children": [
        {
            "data": [
                {
                    "time": "202501",
                    "value": 0.4846223623220571,
                    "type": "prediction_score_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.4846223623220571
                },
                {
                    "time": "202501",
                    "value": 0.5241715962498887,
                    "type": "prediction_score_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.5241715962498887
                },
                {
                    "time": "202501",
                    "value": 0.4073719140751409,
                    "type": "final_prob_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.4073719140751409
                },
                {
                    "time": "202501",
                    "value": 0.428439604901525,
                    "type": "final_prob_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.428439604901525
                },
                {
                    "time": "202502",
                    "value": 0.48549450926322646,
                    "type": "prediction_score_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.48549450926322646
                },
                {
                    "time": "202502",
                    "value": 0.5119367768314642,
                    "type": "prediction_score_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.5119367768314642
                },
                {
                    "time": "202502",
                    "value": 0.4065108130743259,
                    "type": "final_prob_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.4065108130743259
                },
                {
                    "time": "202502",
                    "value": 0.41804945688452333,
                    "type": "final_prob_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.41804945688452333
                },
                {
                    "time": "202503",
                    "value": 0.5035093885244725,
                    "type": "prediction_score_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.5035093885244725
                },
                {
                    "time": "202503",
                    "value": 0.5310100823455524,
                    "type": "prediction_score_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.prediction_score",
                    "originValue": 0.5310100823455524
                },
                {
                    "time": "202503",
                    "value": 0.4353751688533189,
                    "type": "final_prob_2ca3d1cb/通用3m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.4353751688533189
                },
                {
                    "time": "202503",
                    "value": 0.4443267368092356,
                    "type": "final_prob_2ca3d1cb/通用1m30d_身份证号/整体/yx_mybk_rm_dev.x_375693_dq_v6_pred_1204_2_0_30_2.final_prob",
                    "originValue": 0.4443267368092356
                }
            ],
            "type": "line",
            "style": {
                "lineWidth": 2
            },
            "axis": {
                "x": {
                    "labelAutoHide": true,
                    "labelAutoRotate": false,
                    "title": false
                },
                "y": {
                    "title": false,
                    "tick": false
                }
            },
            "height": 300,
            "scale": {
                "y": {
                    "domainMin": 0,
                    "key": "child0Scale",
                    "independent": true,
                    "nice": true
                }
            },
            "overlapHide": true,
            "scaleConfig": {},
            "interaction": {
                "tooltip": {}
            },
            "legend": {
                "cols": 1,
                "orientation": "vertical",
                "position": "left",
                "color": true
            },
            "encode": {
                "x": "time",
                "y": "value",
                "color": "type"
            },
            "labels": [
                {
                    "__transform__": true,
                    "style": {
                        "dy": -10,
                        "textAlign": "middle"
                    },
                    "transform": [
                        {
                            "type": "overlapHide"
                        }
                    ]
                }
            ]
        }
    ]
}

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

Please select / 请选择

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for maintainerTriage or intervention needed from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions