gpt4 book ai didi

javascript - c3js,X 轴被压碎且格式错误

转载 作者:行者123 更新时间:2023-12-02 14:31:21 26 4
gpt4 key购买 nike

目前我正在玩这个例子: http://c3js.org/samples/axes_x_tick_culling.html

但问题是,当您添加 3-4 倍的数据量时,X 值会被破坏且格式错误。我该如何解决这个问题?

请参见此处:/image/gzrTR.png

谢谢。

最佳答案

宽度对我来说工作正常,看看 X axis with tripple digit numbers

enter link description here

var chart = c3.generate({
data: {
columns: [
['sq', 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250,30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 30, 200, 100, 400, 150, 250, 200, 100, 400, 150, 250]

]

},
axis: {
x: {
type: 'category',
tick: {
width: 22,
culling: {
max: 7
}
}
}
}

});

关于javascript - c3js,X 轴被压碎且格式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37793194/

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