views:

51

answers:

0

Hi All, I have a problem in binding data to the JQ Plot

<script type="text/javascript" language="javascript">
     $(document).ready(function () {
         // $.jqplot.config.enablePlugins = true;


                          var goog = [
        ['6/22/2009', 425.32],
                      ['6/8/2009', 424.84],
                      ['5/26/2009', 417.23],
                      ['5/11/2009', 390],
                      ['4/27/2009', 393.69],
                      ['4/13/2009', 392.24],
                      ['3/30/2009', 369.78],
                      ['3/16/2009', 330.16],
                      ['3/2/2009', 308.57],
                      ];

         plot = $.jqplot('chart1', [goog], {
             // title: 'Google, Inc.', 
             series: [{
                 // label: 'Google, Inc.', 
                 neighborThreshold: -1
             }],
             axes: {
                 xaxis: {
                     renderer: $.jqplot.DateAxisRenderer,
                     min: 'Feburary 03, 2009',
                     tickInterval: '1 month',
                     tickOptions: { formatString: '%Y/%#m/%#d' }
                 },
                 yaxis: {
                     renderer: $.jqplot.LogAxisRenderer,
                     tickOptions: { formatString: '$%.2f' }
                 }
             },
             cursor: { show: true, zoom: true }
         });
     });
</script>

in the above code there are hardcoded values (ie array) binded to the JQplot but i need to achieve this through asp.net i am returning a datatable with 2 columns date and price now i need to bind this data to the jqplot so how should i go ahead with it.

Please Need a help on it

Thanks in Advance

Kind Regards, D.Mahesh