I am trying to create a histogram using C3 and D3, but I am having problems so that the columns are not connected to each other, except that they use the same scale along the Y axis.
I included images to better explain.
var chart = c3.generate({ bindto: '#designerChart', data: { columns: [ ['MA', 6], ['ME', 8], ['NY', 6], ['CN', 5], ['TX', 2] ], type: 'bar', }, axis: { y: { max: 10, min: 0, padding: { top: 0, bottom: 0 } } } });
The results are in a group of bars, and when I hang over them, I get the details for all the bars - not what I want.

I can change the data to display individual columns, but they are the same color, and when I want to go to the pie chart, you cannot distinguish between states.
var chart = c3.generate({ bindto: '#designerChart', data: { x: 'x', columns: [ ['x','MA', 'ME', 'NY', 'CN', 'TX'], ['rainfall', 6, 8, 6, 5, 4 ] ], type: 'bar', }, axis: { x: { type: 'category' }, y: { max: 10, min: 0, padding: { top: 0, bottom: 0 } } } });

This is what I want:
