在chart.js 2.7中,他们可以通过任何方式更改afterFooter文本的颜色,以使其与页脚textColor的颜色不同?
这是我当前正在使用的工具提示和回调设置:
我希望“页脚文字”和“页脚文字之前”的颜色互不相同。
tooltips:{
callbacks: {
title: function(tooltipItem, data) {
return 'Title Text ';
},
label: function(tooltipItem, chart) {
return 'Label Text';
},
beforeFooter: function(tooltipItem, chart) {
return 'Before Footer Text';
},
footer: function(tooltipItem, chart) {
return 'Footer Text';
}
},
backgroundColor: '#FFF',
titleFontSize: 15,
titleFontColor: '#4d4d4d',
titleFontStyle: 'normal',
bodyFontColor: '#fccf93',
bodyFontSize: 15,
footerFontColor: '#356699',
footerFontStyle: 'normal',
footerFontSize: 15,
caretSize:0,
cornerRadius: 0,
xPadding: 30,
yPadding: 30,
}
}