Edit in JSFiddle

var chart = c3.generate({
  bar: {
    width: 15
  },
  padding: {
    left: 60
  },
  data: {
    x: 'Letter',
    columns:
    [
      ['Letter', 'A','B','C','D'],
      ['value', 25,50,75,100]
    ],

    type: 'bar',
    onclick: function(e) { console.log(ylist[e.x]);a = this;}

  },
  axis: {
    x: {
      type: 'category'
    }
  },
  legend: {
    show: false
  }
});
<body>
    <div id="chart"></div>
</body>

              

External resources loaded into this fiddle: