title: jqplot generate plot using functions returned values
body: <p>Sorry for this based question. I am fresh to jqplot and would like to use it to generate a bar graph based on data calculated from a function. </p>
  
  <p>Now, I have a parameter which holds data. Also, I have simple codes to generate a bar plot. So, can anyone give me a hint on how to link these two pieces together?</p>
  
  <p>Thanks!</p>
  
  <p>Here is the code:</p>
  
  <pre><code>x_data=function(a,b,c,d) 
  #this is the data generated from a function and it needs to be 
  #sent to jqplot function, i.e., x_data=[165.33, 102.9, 89.04, 181.54, 114.92]. 
  #In order to pass the parameter to jqplot, do I need to print it out in the HTML?
  
  
  &lt;script type='text/javascript'&gt; 
  $(document).ready(function(x_data){
          $.jqplot.config.enablePlugins = true;
          var s1=x_data; //I need to find a way to link s1 to x_data 
  
          $.jqplot('chart1', [s1], {
              seriesDefaults:{
                  renderer:$.jqplot.BarRenderer,
                  pointLabels: { show: true },
                  rendererOptions: {
                  barWidth: 3
                  }
              }
          })   
      })
  &lt;/script&gt;
  </code></pre>