title: How to get all json values in line chart
body: <p>I have many Json values, using them I am going to create a line chart but it shows only one value in the  chart. I am a newbie to javascript and have an idea to plot all values in chart. please anybody give jsfiddle example for this issue.</p>
  
  <p>HTML code</p>
  
  <pre><code>&lt;div id="chartContainer" class="chart"&gt;
  </code></pre>
  
  <p></p>
  
  <p>Script</p>
  
  <pre><code>$.getJSON('dashboard_summary.php?', function(data) {
      var len = data.length
  
      $.each(data, function(i, v) {               
          chart(v.Date,v.Tip,v.Revenue,len);
      });
  });
  
  function chart (dates,Tip,Rev,len) {    
      var chart = new CanvasJS.Chart("chartContainer", {
          title: {
              text: "Revenue",
              fontSize: 15
          },
          axisX: {
              gridColor: "Silver",
              tickColor: "silver",
              valueFormatString: "DD/MMM"
          },                        
          toolTip: {
              shared:true
          },
          theme: "theme2",
          axisY: {
              gridColor: "Silver",
              tickColor: "silver"
          },
          legend: {
              verticalAlign: "center",
              horizontalAlign: "right"
          },
          data: [
              {                   
                  type: "line",
                  showInLegend: true,
                  lineThickness: 2,
                  name: "Tip",
                  markerType: "square",
                  color: "#F08080",
                  dataPoints: [
                      {
                          x: new Date(dates),
                          y: parseInt(Tip)
                      }
                  ]
              },
              {        
                  type: "line",
                  showInLegend: true,
                  name: "Revenue",
                  color: "#20B2AA",
                  lineThickness: 2,
                  dataPoints: [
                      {
                          x: new Date(dates),
                          y: parseInt(Rev)
                      }
                  ]
              }
          ],
          legend: {
              cursor: "pointer",
              itemclick: function(e) {
                  if (typeof(e.dataSeries.visible) === "undefined" || e.dataSeries.visible) {
                      e.dataSeries.visible = false;
                  } else {
                      e.dataSeries.visible = true;
                  }
                  chart.render();
              }
          }
      });
  
      chart.render();
  };
  </code></pre>
  
  <p>Json data</p>
  
  <pre><code>{
      "Date": "2014-01-30",
      "CarsParked": "1",
      "RevenueWithTip": "0",
      "Revenue": "0",
      "Tip": "0",
  },
  {
      "Date": "2014-01-31",
      "CarsParked": "10",
      "RevenueWithTip": "10",
      "Revenue": "7",
      "Tip": "3",
  },
  {
      "Date": "2014-02-28",
      "CarsParked": "28",
      "RevenueWithTip": "55",
      "Revenue": "47",
      "Tip": "8",
  }
  </code></pre>