title: C3.js chart doesn't read variable in load function
body: <p>I'm using C3.js library and when I want add in the line chart one value dynamically, I call the function <code>updateChartC3(action, values)</code> with receives from PHP by <code>AJAX</code> and inside the function <code>updateChartC3(action, values)</code> I call the <code>load()</code> function to update the chart.</p>
  
  <p>Doesn't work using the variable <code>"values"</code> (1st option). In the 2nd option, work very well.</p>
  
  <p>I only want work with the first option.</p>
  
  <pre><code>var chart = '';
  
  function startChart(columns_, positions, pcs, _height) {
  
    chart = c3.generate({
      bindto: '#chart-div',
      size: {
        height: _height
      },
      data: {
        bindto: '#chart',
        columns: columns_,
        order: 'asc'
      },
      zoom: {
        enabled: false
      },
      transition: {
        duration: 1000
      },
      axis: {
        x: {
          label: {
            text: "XKB",
            position: 'outer-center'
          },
          type: 'category',
          categories: pcs,
          tick: {
            centered: true
          }
        },
        y: {
          label: {
            text: 'Position',
            position: 'inner-middle'
          },
          tick: {
            values: positions
          },
          inverted: true,
          allowDecimals: false
        }
      }
    });
  }
  
  function updateChartC3(action, values) {
    // values = [ [ 'taripeco',18,14,12,'p','p', 'p' ] ]
    // 1st option - work
    if (action == 'add') {
      chart.load({
        columns: [
          ['taripeco', 18, 14, 12, 'p', 'p', 'p']
        ]
      });
    }
  
    // 2nd option- doesn't work
    if (action == 'add') {
      chart.load({
        columns: values
      });
    }
  }
  </code></pre>