Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var doughnutData = {
- labels: [
- "DM orange",
- "DM rosa",
- "DM lilla",
- "DM gron",
- "DM turkis"
- ],
- datasets: [
- {
- data: [43667, 453, 80924, 896, 88],
- backgroundColor: [
- "#ec8316",
- "#AF23A5",
- "#66008C",
- "#568E14",
- "#00829B"
- ],
- hoverBackgroundColor: [
- "#ff8300",
- "#9d3292",
- "#522e91",
- "#5d9632",
- "#0083a8"
- ]
- }]
- };
- jQuery(document).ready(function() {
- var ctx = document.getElementById("chart-area").getContext("2d");
- window.myDoughnutChart = new Chart(ctx, {
- type: 'doughnut',
- data: doughnutData,
- options: {
- responsive: true,
- elements: {
- arc: {
- borderColor: "#000000"
- }
- },
- cutoutPercentage: 50
- },
- animation:{
- animateScale: true
- }
- });
- });
- var doughnutData1 = {
- labels: [
- "orange",
- "rosa",
- "lilla",
- "gron",
- "turkis"
- ],
- datasets: [
- {
- data: [10913, 2693, 4104, 26832, 21443],
- backgroundColor: [
- "#ec8316",
- "#AF23A5",
- "#66008C",
- "#568E14",
- "#00829B"
- ],
- hoverBackgroundColor: [
- "#ff8300",
- "#9d3292",
- "#522e91",
- "#5d9632",
- "#0083a8"
- ]
- }]
- };
- // <!-- teste 2 usando Chart.js / Gráficos enfileirados -->
- jQuery(document).ready(function() {
- var ctx1 = document.getElementById("chart-area2").getContext("2d");
- window.myDoughnutChart2 = new Chart(ctx1, {
- type: 'doughnut',
- data: doughnutData1,
- options: {
- responsive: true,
- elements: {
- arc: {
- borderColor: "#333"
- }
- },
- cutoutPercentage: 50
- },
- animation:{
- animateScale: true
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement