title: Pass data in form of variable -Highcharts
body: <p>I am trying to implement high charts(pai chart) in my system where I am trying to pass the the value of data from a variable which contains the value in exact array manner that data required, <code>alert(legend_with_values)</code> If I am alerting this variable it returns <code>[['agent_total_members',24],['billing_failed',0],['members_inactive',0],['members_expired',0] ]</code> I am Passing this value to the data field like this </p>
  
  <pre><code> legend_with_values;
   alert(legend_with_values);
  </code></pre>
  
  <blockquote>
    <p>this alert returns [['agent_total_members',24],['billing_failed',0],['members_inactive',0],['members_expired',0] </p>
  </blockquote>
  
  <pre><code>  options.series = [{
      type: 'pie',
      name: 'Legend',
      data: legend_with_values
    }];
    new Highcharts.Chart(options);`
  </code></pre>
  
  <p>But when I am passing this variable in data it is coming in this manner .Check the image it is taking each character as a string <img src="https://i.stack.imgur.com/RBQEa.png" alt="e"></p>
  
  <p>and if I put the alert value statically in the data it is showing me graph properly any suggestions how to fix this ?</p>