gpt4 book ai didi

html - 错误 : attribute transform: Expected number, "translate(NaN, 0)"

转载 作者:行者123 更新时间:2023-11-28 02:31:33 26 4
gpt4 key购买 nike

显示以下图表时(仍在工作)。我收到以下错误:

Error: <g> attribute transform: Expected number, "translate(NaN, 0)".

我的代码如下:

var Attempts = c3.generate({
bindto: '#attempts',
data: {
url: 'attempts.csv',
x:"index",
type: 'donut',
onclick: function (d, i) { console.log("onclick", d, i); },
onmouseover: function (d, i) { console.log("onmouseover", d, i); },
onmouseout: function (d, i) { console.log("onmouseout", d, i); }
},
donut: {
label: {
format: function (value) { return value; }
}
}
});

attempts.csv 是:

index,Basic Mechanics,Basic Thermodynamics,Calculus I,Calculus II,Chemistry I,Chemistry II,Engineering Drawing,Fundamentals of Informatics,Geometry,Linear Algebra
ATTEMPTS,1.416,1.404,1.421,1.347,1.305,1.246,1.261,1.456,1.325,1.385

完整的错误是:

c3_chart_internal_fn.convertUrlToData
c3_chart_internal_fn.init
Chart
c3.generate
(anonymous)

最佳答案

这个错误,如果“js”代码存在

$('#test').vectorMap();

并且“html”代码不存在。

<div id="test"></div>

关于html - 错误 : <g> attribute transform: Expected number, "translate(NaN, 0)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50375171/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com