title: jqplot multiple array as parameter
body: <p>Hi I'm using a <code>servlet</code> response to supply parameter to <code>jqplot</code> for a <code>barchart</code></p>
  
  <p>the <code>servlet</code> response statement is something like this:</p>
  
  <pre><code>out.println("725,759,2032,171,2761,133175,166163,409,28630,3754@0,375,1482,0,2051,125857,167524,0,125406,4022@0,0,0,1,0,125406,0,0,0,0");
  </code></pre>
  
  <p>If it is a success response, <code>ajax</code> will then call a plot function using <code>dataRenderer: dataRenderer(dataArr)</code> as the array parameter. 
  However, an <strong>error indicate "No data specified" is found</strong>.</p>
  
  <p>I try to log the dataRenderer return which is </p>
  
  <pre><code>"725,759,2032,171,2761,133175,166163,409,28630,3754,0,375,1482,0,2051,125857,167524,0,125406,4022,0,0,0,1,0,125406,0,0,0,0"
  </code></pre>
  
  <p>But the expected answer should be </p>
  
  <pre><code>[725,759,2032,171,2761,133175,166163,409,28630,3754],[0,375,1482,0,2051,125857,167524,0,125406,4022],[0,0,0,1,0,125406,0,0,0,0]
  </code></pre>
  
  <p>Any help is highly appreciated! thanks</p>
  
  <p></p>
  
  <pre><code>function log(msg) {
  setTimeout(function() {
      throw new Error(msg);
  }, 0);
  }
  
  var form = $('#form1');
  var storedData = [3, 7];
  var plot1;
  
  //$( "#plot" ).click(function(){
  form.submit(function(){
   $.ajax({
   type: form.attr('method'),
   url: form.attr('action'),
   data: {n1:n1.value,n2:n2.value},
   success: function (data) {
   var result=data;
   //$('#result').attr("value",result);
   renderGraph(result);
   }
   });
   return false;
   });
  
  
   var dataRenderer = function(userData){
  
      var result = new Array();
  
  
      var seperator1 = /\s*@\s*/;
      var seperator2 = /\s*,\s*/;
  
      storedData = userData.split(seperator1);
      result.push(storedData[0].split(seperator2));
      result.push(storedData[1].split(seperator2));
      result.push(storedData[2].split(seperator2));
  
      return result;
   };
  
   function renderGraph(dataArr) {
  
  if (plot1) {
      plot1.destroy();
  
  }
  
  
   log(dataRenderer(dataArr));
  
  
  
  var ticks = ['Pub1', 'Pub101', 'Pub121', 'Pub141', 'Pub161', 'Pub2', 'Pub3', 'Pub61', 'Pub81', 'Pub82'];
  
      var plot1 = $.jqplot('chart1', [], {
  
                      dataRenderer: dataRenderer(dataArr),
          seriesColors : ['#1cbd17', '#e44e23', '#23b9e4', '#C7754C', '#17BDB8', '#b817bd'],
          seriesDefaults : {
              renderer : $.jqplot.BarRenderer,
              rendererOptions : {
                  fillToZero : true
              }
          },
          series : [{
                  label : 'delivered'
              }, {
                  label : 'filtered out'
              }, {
                  label : 'incomplete'
              }, {
                  label : ''
              }
          ],
          legend : {
              show : true,
              placement : 'outsideGrid'
          },
          axes : {
              xaxis : {
                  renderer : $.jqplot.CategoryAxisRenderer,
                  ticks : ticks
              },
              yaxis : {
                  pad : 1.05,
                  tickOptions : {
                      formatString : '%d'
                  }
              }
          }
  
      });  
  
      plot1.resetAxesScale(); 
      plot1.replot();
  }
   &lt;/script&gt;
  </code></pre>