Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

chart js

var xValues = ["HTML", "CSS", "JavaScript", "PHP", "Python"];
var yValues = [55, 49, 44, 24, 15];
var barColors = [
  "#b91d47",
  "#00aba9",
  "#2b5797",
  "#e8c3b9",
  "#1e7145"
];

new Chart("pieChart", {
  type: "doughnut",
  data: {
    labels: xValues,
    datasets: [{
      backgroundColor: barColors,
      data: yValues
    }]
  },
  options: {
    title: {
      display: true,
      text: "Programming Languages"
    }
  }
});
Source by valor-software.com #
 
PREVIOUS NEXT
Tagged: #chart #js
ADD COMMENT
Topic
Name
7+9 =