<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> </style> <script src="/js/Chart.min.js"></script> </head> <body> <div id="test" style="width:400px;"> <canvas id="myChart"></canvas> </div> <script> 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], }] },
// Configuration options go here options: {} }); </script> </body> </html> |