title: Passing variables to Data for Jquery Plot
body: <p>I have a Jquery.Flot.Pie chart and when I pass directly numbers to Data it works (like this), and also with only one slice.</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
  
      var ord = $("#MyUserInfoBoxControl_txtOrd").val();        
      var lav = $("#MyUserInfoBoxControl_txtLav").val();
      var pro = $("#MyUserInfoBoxControl_txtPro").val();
      var con = $("#MyUserInfoBoxControl_txtCon").val();
      var ins = $("#MyUserInfoBoxControl_txtIns").val();
  
      alert(ord + "," + lav + "," + pro + "," + con + "," + ins);
  
      var data = [
          { label: "INS", data: 0, color: "#FFFFFF" },
          { label: "LAV", data: 0, color: "#4572A7" },
          { label: "PRO", data: 0, color: "#80699B" },
          { label: "CON", data: 0, color: "#AA4643" },
          { label: "ORD", data: 100, color: "#3D96AE"}
      ];
  
      alert(data[0].toString())
  
      $.plot($("#Grafico"), data, {
          series: {
              pie: {
                  show: true,
                  threshold: 0,
                  tilt: 1
  
              }
          },
          legend: {
              show: false
          }
      });
  });
  </code></pre>
  
  <p></p>
  
  <p>Instead, When I try to pass variables to data array it doen't work anymore (the alert it's Ok, so data are Right) I've tried also to use parseFloat() but nothing to do:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
  
      var ord = $("#MyUserInfoBoxControl_txtOrd").val();        
      var lav = $("#MyUserInfoBoxControl_txtLav").val();
      var pro = $("#MyUserInfoBoxControl_txtPro").val();
      var con = $("#MyUserInfoBoxControl_txtCon").val();
      var ins = $("#MyUserInfoBoxControl_txtIns").val();
  
      alert(ord + "," + lav + "," + pro + "," + con + "," + ins);
  
      var data = [
          { label: "INS", data: ins, color: "#FFFFFF" },
          { label: "LAV", data: lav, color: "#4572A7" },
          { label: "PRO", data: pro, color: "#80699B" },
          { label: "CON", data: con, color: "#AA4643" },
          { label: "ORD", data: ord, color: "#3D96AE"}
      ];
  
      alert(data[0].toString())
  
      $.plot($("#Grafico"), data, {
          series: {
              pie: {
                  show: true,
                  threshold: 0,
                  tilt: 1
  
              }
          },
          legend: {
              show: false
          }
      });
  });
  </code></pre>
  
  <p></p>
  
  <p>Can someone Help me? Thanks!</p>