Chart js 2.7我可以更改页脚和页脚之前的颜色吗

时间:2019-02-02 00:10:57

标签: chart.js

在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,
                }
}

0 个答案:

没有答案
相关问题