title: Preprocessing data in HighCharts JS in C# ASP.NET
body: <p>I'm creating a bar chart in ASP.NET 2.0 using <a href="http://www.highcharts.com/" rel="nofollow">HighCharts JS</a>. </p>
  
  <p>here's how the chart can be do in javascript:</p>
  
  <pre><code>$(function () { 
      $('#container').highcharts({
          chart: {
              type: 'bar'
          },
          title: {
              text: 'Fruit Consumption'
          },
          xAxis: {
              categories: ['Apples', 'Bananas', 'Oranges']
          },
          yAxis: {
              title: {
                  text: 'Fruit eaten'
              }
          },
          series: [{
              name: 'Jane',
              data: [1, 0, 4]
          }, {
              name: 'John',
              data: [5, 7, 3]
          }]
      });
  });​
  </code></pre>
  
  <p>i have this in c# code-behind:</p>
  
  <pre><code>public string[] Names = new string[] { "Name1", "Name2", "Name3"};
  public string[] Data = new  string[] { "[1,0,4]", "[5,7,3]", "[2,3,4]"};
  </code></pre>
  
  <p>How can I used this string[] Names and Data in javascript to change the value of the chart?</p>
  
  <p>Please help I'm stuck in it. :( Thanks! </p>
  
  <p><strong>--EDIT for ARISTOS--</strong></p>
  
  <p>I tried your answer but that doesn't work. Base on your answer this javascript will be the same with what you do. check this: </p>
  
  <pre><code>$(function () { 
      var seriesTest = "{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3] }";
  
      $('#container').highcharts({
          chart: {
              type: 'bar'
          },
          title: {
              text: 'Fruit Consumption'
          },
          xAxis: {
              categories: ['Apples', 'Bananas', 'Oranges']
          },
          yAxis: {
              title: {
                  text: 'Fruit eaten'
              }
          },
          series: [seriesTest]
      });
  });​
  </code></pre>
  
  <p>I tried this already but this not work because I think series.data only accepts integer inside its bracket ([]). </p>
  
  <p>I already check DotNet.HighCharts as suggested by KingCronus but this can't be use in asp.net 2.0 framework. :( </p>