Javascript examples for Chart.js:Chart Color
Charts.js to configure colors and fill in the options variable
<html> <head> <title>chart.js 2.0 bar</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.3/Chart.min.js"></script> <script type="text/javascript"> window.onload=function(){/* ww w. j a v a2s . com*/ var canvas = document.getElementById('myChart'); var data = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [{ label: "My First dataset", data: [65, 59, 50, 81, 56, 55, 40], }, { label: "My First dataset", data: [65, 59, 20, 81, 56, 55, 40], } ] }; var options = { elements: { line: { fill: false } } } Chart.Line(canvas, { data: data, options: options }); } </script> </head> <body> <canvas id="myChart" width="400" height="200"></canvas> </body> </html>