MarieTo
MarieTo

Reputation: 11

chartjs - edit or remove label

Excuse my English but it's very poor. I have a problem and I cannot solve it.

How do you edit the background of the labels (or remove this information)

http://s33.postimg.org/5ayxjlkcv/eac8a54f51_1.jpg

I can't find it in the documentation.

Here is my code:

http://codepen.io/anon/pen/XKXJEr

var ctx = document.getElementById("myChart");
Chart.defaults.global.defaultFontColor = '#ccceee';
Chart.defaults.global.elements.line.backgroundColor = '#fff';
var toto = new Chart(ctx, {
  type: 'radar',
  data: {
    labels: ["eat","sleep","drink","run","empty"],
    datasets: [
      {
        label: "Day",
        backgroundColor: "rgba(0,204,255,0.5)",
        borderColor: "rgba(255,255,255,1)",
        borderWidth: "1px",
        pointBackgroundColor: "rgba(255,99,132,1)",
        pointBorderColor: "#fff",
        pointHoverBackgroundColor: "#fff",
        pointHoverBorderColor: "rgba(255,99,132,1)",
        data: ["135","145","5","125","12"]                    },
      {
        label: 'Average',
        backgroundColor: "rgba(255,162,0,0.8)",
        borderColor: "rgba(255,255,255,1)",
        borderWidth: "1px",
        pointBackgroundColor: "rgba(255,99,132,1)",
        pointBorderColor: "#fff",
        pointHoverBackgroundColor: "#fff",
        pointHoverBorderColor: "rgba(255,99,132,1)",
        data: ["70","75","45","87.5","20.5"]                    }
    ]
  },
  options: {
    legend: {
      position: 'bottom',
    },
    title: {
      display: true,
      text: 'Your Progress'
    }
  }
});

Upvotes: 1

Views: 1422

Answers (1)

Martin Deltour
Martin Deltour

Reputation: 11

for change

options: {
    scale: {
       ticks :{
         fontColor: '#ff0000',
         backdropColor: '#00FF00'
       } 
    }
  }

to hide :

scale: {
       ticks :{
         display: false
       } 
    }

or

scale: {
       ticks :{
         showLabelBackdrop: false
       } 
    }

Upvotes: 1

Related Questions