Skip to content
Discussion options

You must be logged in to vote

@DejanHuang Chart.js 的小细节参数太多了,我们没有时间与精力去一一对应设计出 C# 的对象模型,有些根本无法设计,所以我们预留了一个 js 脚本扩展

if (window.BootstrapBlazor.Chart === void 0) {
    const elementMap = new Map();
    window.BootstrapBlazor.Chart = new class {
        setOptionsById(element, instance) {
            if (!elementMap.has(element)) {
                elementMap.set(element, instance)
            }
        }

        getOptionsById(element) {
            if (elementMap.has(element)) {
                return elementMap.get(element)
            }

            return null
        }

        removeOptionsById(element) {
            if (!elementMap.has(element)) {
                return
            }

            elementMap.delet…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ArgoZhang
Comment options

Answer selected by DejanHuang
@DejanHuang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
chore This are tasks or bot action
2 participants
Converted from issue

This discussion was converted from issue #7597 on January 30, 2026 03:38.