8000 [Bug] updateSpec后,indicator visible未更新 · Issue #3675 · VisActor/VChart · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug] updateSpec后,indicator visible未更新 #3675
Closed
@skie1997

Description

@skie1997

Version

1.13.3

Link to Minimal Reproduction

null

Steps to Reproduce

const spec = {
    "0": "{",
    "1": "}",
    "chartSpecUpdateId": "FfzhPAxsHzP_2ngBSmqkF",
    "type": "pie",
    "theme": "builder-desktop",
    "color": [
        "#4E83FD",
        "#50CEFB",
        "#935AF6",
        "#FAD355",
        "#F76964",
        "#FFA53D"
    ],
    "data": {
        "values": [
            {
                "channel_type": "电商平台",
                "amount": 262
            },
            {
                "channel_type": "自有网站",
                "amount": 282
            },
            {
                "channel_type": "微信小程序",
                "amount": 311
            },
            {
                "channel_type": "实体门店",
                "amount": 350
            },
            {
                "channel_type": "电话订购",
                "amount": 400
            }
        ]
    },
    "label": {
        "visible": true
    },
    "tooltip": {
        "mark": {
            "content": {}
        },
        "dimension": {
            "content": {}
        }
    },
    "legends": {
        "visible": true,
        "orient": "bottom",
        "position": "middle"
    },
    "indicator": {
        "visible": false,
        "title": {
            "visible": true,
            "style": {
                "text": "bbb"
            }
        },
        "content": [
            {
                "visible": true,
                "style": {
                    "fontSize": 20,
                    "text": "2222"
                }
            }
        ]
    },
    "valueField": [
        "amount"
    ],
    "categoryField": [
        "channel_type"
    ],
    "innerRadius": 0.55
}

const spec2 = {
    "0": "{",
    "1": "}",
    "chartSpecUpdateId": "Q4F82VN3Djc_dp7puhSld",
    "type": "pie",
    "theme": "builder-desktop",
    "color": [
        "#4E83FD",
        "#50CEFB",
        "#935AF6",
        "#FAD355",
        "#F76964",
        "#FFA53D"
    ],
    "data": {
        "values": [
            {
                "channel_type": "电商平台",
                "amount": 262
            },
            {
                "channel_type": "自有网站",
                "amount": 282
            },
            {
                "channel_type": "微信小程序",
                "amount": 311
            },
            {
                "channel_type": "实体门店",
                "amount": 350
            },
            {
                "channel_type": "电话订购",
                "amount": 400
            }
        ]
    },
    "label": {
        "visible": true
    },
    "tooltip": {
        "mark": {
            "content": {}
        },
        "dimension": {
            "content": {}
        }
    },
    "legends": {
        "visible": true,
        "orient": "bottom",
        "position": "middle"
    },
    "indicator": {
        "visible": true,
        "title": {
            "visible": true,
            "style": {
                "text": "aaa"
            }
        },
        "content": [
            {
                "visible": true,
                "style": {
                    "fontSize": 20,
                    "text": "1111"
                }
            }
        ]
    },
    "valueField": [
        "amount"
    ],
    "categoryField": [
        "channel_type"
    ],
    "innerRadius": 0.55
}

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

vchart.updateSpec(spec2)

// Just for the convenience of console debugging, DO NOT COPY!
window
60C1
['vchart'] = vchart;

Current Behavior

image

Expected Behavior

indicator展示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0