![](/img/trans.png)
[英]How can I change the legend label without affecting my tooltip label?
[英]How can I remove the button label my dataset without affecting my chart
我想消除操作的標簽,但是這樣做會影響我的所有功能。
var ctx = document.getElementById("CountryChart");<br>
var myChart = new Chart(ctx, {<br><br>
type: 'bar',<br>
data: {<br>
labels: ["México", "Japon", "USA", "China", "Pakistan"],<br><br>
datasets: [{<br>
label: '# Of Votes',**--this label i want to eliminate--**<br>
data: [12, 19, 3, 5, 2, 3],<br>
backgroundColor: [<br><br>
添加以下選項:這應該隱藏它而不影響任何內容。
options: { legend: { display: false }}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.