2016-06-09 94 views
0

請原諒我的英語,但它很差。我有一個問題,我無法解決它。chartjs - 編輯或刪除標籤

如何編輯標籤的背景(或刪除此信息)

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

我不能在文檔中找到它。

這裏是我的代碼:

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' 
    } 
    } 
}); 

回答

0

變革

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

隱藏:

scale: { 
     ticks :{ 
     display: false 
     } 
    } 

scale: { 
     ticks :{ 
     showLabelBackdrop: false 
     } 
    }