Edit in JSFiddle

const type = 'donut'
const title = '# Kittens Love #'

var chart = c3.generate({
    data: {
        columns: [
            ['Yoko', 50],
            ['Linda', 50],
        ],
        type
    },
    donut: { title }
});
<div id="chart"></div>
body {
  font-family: Arial;
  font-size: 12px;
}