title: add array of unknown length in a dataset javascript
body: <p>I am creating a js chart and here is a code snipet</p>
  
  <pre><code>  var period=array(3,6,7,4,9);
     var marks=array(76,87,45,87,44);
          var randomScalingFactor = function(){ return    Math.round(Math.random()*100)};   
  
                  var lineChartData = {
                      labels : [period[0],period[1],period[2],period[3]],
          datasets : [
              {
                  label: "My First dataset",
                  fillColor : "rgba(220,220,220,0.2)",
                  strokeColor : "rgba(220,220,220,1)",
                  pointColor : "rgba(220,220,220,1)",
                  pointStrokeColor : "#fff",
                  pointHighlightFill : "#fff",
                  pointHighlightStroke : "rgba(220,220,220,1)",
                  data :    [marks[0],marks[1],marks[2],marks[3]]
              }
          ]
  
      }
  
    window.onload = function(){
      var ctx = document.getElementById("canvas").getContext("2d");
      window.myLine = new Chart(ctx).Line(lineChartData, {
          responsive: true
      });
    }
  </code></pre>
  
  <p>I need to replace data:[10,20,30...] with an array values[1,3,6,34,56,...] with unknown width. I cant figure out how to inject array inside the 'data'. I tried converting the array to comma separated string and added it like</p>
  
  <pre><code>var mar=5+','+6+','+7+','+31;   
  data : [mar]
  </code></pre>
  
  <p>and it couldn't work. Every suggestion is welcome
  /////////////////////////
  I have edited to show marks and period which are arrays of known width. Now I have an array of unknown length that I want to inject to 'data[]'</p>