0 votes
in Programming by (580 points)

I want to set units in my pie chart-pie.js. in this data sets i want to add a unit "'Rp'+data" in my pie-chart.js

enter image description here

here is my code

// Pie Chart Example
var ctx = document.getElementById("myPieChart");
var myPieChart = new Chart(ctx, {
  type: 'pie',
  data: {
    labels: ["Makassar", "Sinjae", "Bulukumba", "Gowa"],
    datasets: [{
      data: [Rp. 4000, Rp. 3000, Rp. 2000, Rp. 5000],
      backgroundColor: ['#007bff', '#dc3545', '#ffc107', '#28a745'],

do you guys have any idea ? any help will be appreciated.

Please log in or register to answer this question.