如何更改背景颜色,并删除这些线,以及如何cahnge一些tex,如何在chartjs中更改背景并删除背景线?
例如:文本的点,当你悬停在某些点上,你会得到这个标题和值。
我的js
function creating_chart(get_wrapper,type_of_chart, labels_of_chart, data_of_charts, title_of_chart){
var ctx = document.getElementById(get_wrapper).getContext('2d');
var myChart = new Chart(ctx, {
type: type_of_chart,
data: {
labels: labels_of_chart,
datasets: [{
label: title_of_chart,
data: [2220, 19998, 55547, 55784, 999985], //data_of_charts
backgroundColor: [
'rgba(47, 152, 208, 0.2)',
],
borderColor: [
'rgba(19, 247, 228,1)',
],
borderWidth: 2,
pointBackgroundColor: 'rgba(19, 247, 228,1)',
pointBorderColor: 'rgba(19, 247, 228,1)',
pointBorderWidth: 5,
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
};
你的意思是改变一些文字?像改变文字颜色或用其他东西替换? –
@我至少改变了背景,也就是删除线条,如果你改变了文字,那么这就是当你指向该点时,显示美元符号和左边总和的度量,也添加在那里! – InvictusManeoBart