only line in line chart - Javascript Chart.js

Javascript examples for Chart.js:Line Chart

Description

only line in line chart

Demo Code

ResultView the demo in separate window

<html>
   <head>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script> 
   </head>/* w ww  . ja v  a  2s .c o m*/
   <body> 
      <div class="container" style="width:600px;height:600px;"> 
         <h2>Order rate Dashboard</h2> 
         <div> 
            <canvas id="myChart"></canvas> 
         </div> 
      </div> 
      <script>
var ctx = document.getElementById('myChart').getContext('2d');
var myChart = new Chart(ctx, {
  type: 'line',
  data: {
    labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
    datasets: [{
     fill: false,
      label: 'apples',
      data: [12, 19, 3, 17, 6, 3, 7]
    }, {
      fill: false,
      label: 'oranges',
      data: [2, 29, 5, 5, 2, 3, 10]
    }]
  }
});

      </script>  
   </body>
</html>

Related Tutorials