有没有一种方法可以减小c3中x轴的宽度(见图)?即使我尝试将“ stroke-width”属性设置为具有不同值的“ ”标记-它也没有进行任何视觉更改。预先感谢您的建议。Picture
var chart = c3.generate({
bindto: '#' + chartId,
data: {
columns: columns,
type: 'bar',
labels: true
},
interaction: {
enabled: false
},
tooltip: {
show: false
},
color: {
pattern: colorPattern
},
bar: {
width: { ratio: 0.7 },
space: 0.25
},
size: settings.ChartSizes.BarChart,
legend: {
position: 'right',
grouped: true,
item: {
onclick: function (d) {
counter++;
if (counter === 1) {
chart.hide();
chart.show(d);
} else {
chart.show();
counter = 0;
}
}
}
},
axis: {
x: {
type: 'category',
categories: categories,
show: showAxe
},
y: {
show: false
}
}
});
这是一个常见问题,是由于您未拾取c3.css文件-参见https://github.com/c3js/c3/issues/1962
如果可以解决,问题就消失了