Last active
June 22, 2017 08:54
-
-
Save evilnapsis/fcb9208a2ac486bac187240bf5d33279 to your computer and use it in GitHub Desktop.
Grafica de Pie con Chart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctx = document.getElementById("chart1"); | |
var red = "#f00"; | |
var orange = "#f50"; | |
var yellow = "#ff0"; | |
var green = "#0f0"; | |
var blue = "#00f"; | |
var myPieChart = new Chart(ctx,{ | |
type: 'pie', | |
data: { | |
datasets: [{ | |
data: [ 1,2,3,4,5 ], | |
backgroundColor: [ red, orange, yellow,green, blue], | |
label: 'Dataset 1' | |
}], | |
labels: [ "Red", "Orange", "Yellow", "Green", "Blue" ] | |
}, | |
options: { | |
responsive: true | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment