Bar Chart issues
Putting several columns into a bar chart, the bars do not fit onto one timestamp and spread across others. Here is an example.

is there a possibility of taking the columns of data and dividing them to get the appropriate width?
The same data works fine for the line graph..

Do I have to change the x axis to categories for them to bunch correctly on the x-axis?
Furthermore, there seems to be an issue with the stacked bar chart:

As you can see, 'employers-national-insurance' is only 2154 but appears above 'salaries' which is 25188. 'Accounts-Recievable' is correct but 'employers-national-insurance' should be below 'salaries'
Hi,
The first issue is a bug. I'll fix to have correct width and position. And the second is not a bug. Currently bars will be stacked according to the order of data, not of the values. However, I think the order should be configurable, so I'll add some option or api.
I fixed the first issue.
could you update the JSON file for the version?
Yes, I updated.
first issue confirmed fix, great work!
Hi,
I added data.order option. This option can be used to change the order of stacking of bars.
I think you can do what you wrote above by setting this option 'desc'.
If you set 'desc', bars will be stacked from one that has minimum sum of its values.
Here is sample - http://c3js.org/samples/data_order.html
Could you try this?
Thats perfect,
Thanks Masayuki!
Think I have discovered an issue with the same values?

As you can see, it adds it to the to if it is the same, making it an incorrect measurement against the Y axis

Perhaps it may be a better to split the bars in two and place them next to each other if they have the same values in the stack?
The image above also shows that two data sources have been assigned the same colour!
Hi,
You mean the order in chart and the order in tooltip is different?
And I think It may be better not to split bars because height will not show the sum of values and so it's not natural as stacked bar chart I think.
About color, c3 gives 10 colors to each data as default (it's d3.scale.category10()). If the number of data is over 10 and same color should be avoided, color.patterns should be used, like:
color.patterns = ['#333', #'999', ...]
awesome, thanks
A colour example on c3 would be cool btw!
Believe it may be:
color: { pattern: ['#111', '#222', '#333', '#D35400'...] },
Hi, I added a sample for color.pattern option - http://c3js.org/samples/options_color.html
Could you try this?
Thank you.