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] updateSpec后,indicator visible未更新 #3675

Closed
skie1997 opened this issue Jan 15, 2025 · 1 comment
Closed

[Bug] updateSpec后,indicator visible未更新 #3675

skie1997 opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@skie1997
Copy link
Contributor

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['vchart'] = vchart;

Current Behavior

image

Expected Behavior

indicator展示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@skie1997 skie1997 added the bug Something isn't working label Jan 15, 2025
@skie1997
Copy link
Contributor Author

期望春节假期后的那周解决

@xile611 xile611 self-assigned this Jan 16, 2025
EchoChenGithub pushed a commit to EchoChenGithub/VChart that referenced this issue Feb 19, 2025
EchoChenGithub pushed a commit to EchoChenGithub/VChart that referenced this issue Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants