labelsAbove 的 rgraph 问题没有出现在第二个图形创建中

rgraph problems with labelsAbove not appearing in second graph creation

我在 canvas 对象中创建了一个带有 labelsAbove 的 Hbar。然后我删除了 canvas 对象(事实上,parrent 对象更改了 innerHTML,删除了 canvas)。当我创建一个新的 canvas 和一个 ne Hbar 时,除了 labelsAbove 之外,一切都很好。他们从未出现过,虽然我给出了相同的选项。

var bar = new RGraph.HBar({
            id: "cvs",
            data: [2,3,8],
            options: {
                labels: ["a","b","c"],
                hmargin: 25,
                labelsAbove: true,
                hmarginGrouped: 3,
                backgroundGridAutofitNumvlines: 5,
                shadowOffsetx: 2,
                shadowOffsety: 2,
                textSize: 16,
                shadowBlur: 2,
                textAccessible: true
            }
        }).grow();

谁能帮帮我?谢谢。

确保第二个 canvas 标记(您通过设置 innerHTML 添加)具有不同的 ID。