Open strizhechenko opened 3 years ago
JSFeedle: https://jsfiddle.net/tymufe5x/
var chart = c3.generate({ data: { columns: [ // light sparse is ok: // ['value', 1, 2, 4], // ['percent', 10, 20, 30] // no sparse is ok too // ['value', 1, 2, 3, 4, 5], // ['percent', 10, 20, 30, 40, 50] // but this way columns 1 and 2 are overlapping ['value', 1, 2, 5], ['percent', 10, 20, 30] ], x: 'value', type: 'bar' }, });
Versions:
you can use
bar: { width: { ratio: 0.5 // this makes bar width 50% of length between ticks } // or //width: 100 // this makes bar width 100px }
https://c3js.org/reference.html#bar-width-ratio
JSFeedle: https://jsfiddle.net/tymufe5x/
Versions: