我正在使用c3js中的以下函数:
chart.load({
point: {
r: function (d) {
return 3;
}
},
bindto: "#chatterplot_elastic",
x: 'x',
xFormat: '%Y-%m-%d %H:%M:%S',
columns: [
getPassantenTotaalOnDate(res),
getPassantenDatesOnDate(res),
AvHensbergenOnDate(res),
GemeentehuisOnDate(res),
CoornhertpadOnDate(res),
DuivenweideOnDate(res),
TricotageOnDate(res)
],
});
正如你所看到的,我正在使用chart.load函数。这一切都很好,除了点值不会更新到值3。
我认为.load函数不会重新配置我试图更改的点设置。
我的问题是:如何确保我可以更改c3js的.load上的点值
原因很简单:加载函数需要某种类型的config.data
。
您希望更改config.point
,但您尝试改为更改config.data.point
(不存在)。
要获得所需的行为,您可以在调用load
函数时添加以下行:chart.internal.config.point_r = 3;