<script src="Chart.min.js"></script> <div style="width:1200px;"> <canvas id="myChart" style="width:90%"></canvas> </div> <script> //https://www.chartjs.org/docs/latest/ var ctx = document.getElementById('myChart').getContext('2d'); var chart = new Chart(ctx, { // The type of chart we want to create type: 'line', // The data for our dataset data: { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [{ label: 'My First dataset', // backgroundColor: 'rgb(255, 99, 132)', //borderColor: 'rgb(255, 99, 132)', data: [0, 10, 5, 2, 20, 30, 45] },{ label: 'My First2 dataset', data: [90, 10, 5, 20, 40, 60, 90] }] }, // Configuration options go here options: {} }); </script> |