LeMoussel LeMoussel - 7 months ago 54
Javascript Question

How to custom donut thickness using c3.js?

I would like to customize a donut chart from c3.js for example the arc thickness.

Any help or pointers are greatly appreciated.

C3.js Donut arc thickness

var chart = c3.generate({
data: {
columns: [
['Data1', 30],
['Data2', 50],
],
type : 'donut'
},
});


Example: http://jsfiddle.net/ktjhh5qr/1/

Answer

You can find an example here.

var chart = c3.generate({
  data: {
    columns: [
      ['bulls', 30],
      ['lakers', 50],
    ],
    type : 'donut',
  },
  donut: { width: 100 }
})

Fiddle : http://jsfiddle.net/ktjhh5qr/2/