Dashboard UI Chart Legend Font color

Hi,
I am trying to get the Legend Text color change from black to White. Whatever I am doing, it always stay Black.

Any idea will be very Welcome :slight_smile:

Thanks a lot

image

In my node Chart Config, I have this configuration:

msg.ui_control = {
options: {
plugins: {
legend: {
display: true,
labels: {
fontColor:'#ffffff',
fontFamily:"'Arial'",
fontStyle:'normal',
fontSize:9
}
}
},
animations: {
tension: {
duration: 1000,
easing: 'linear',
from: 1,
to: 0,
loop: true
}
},

    scales: {
        yAxes: [{
            gridLines:{
                color:'#99999933',
                zeroLineColor:'#99999933',
                tickMarkLength:5
            },
            ticks: {
               fontFamily:"'Arial'",
               fontStyle:'normal',
               fontSize:9,
               fontColor:'#ffffff',
               lineHeight:1,
               precision:0,
               stepSize:3,
               suggestedMin: 22,
               suggestedMax: 29
            }
        }],
        xAxes: [{
            type: 'time',
            time: {
               distribution: 'series'
               },
            
            gridLines: {
                 color:'#99999933',
                zeroLineColor:'#99999933',
                tickMarkLength:5
            },
            legend: {
        display: true,
         labels: {
              fontColor:'#ffffff',
             fontSize:12,
                }
            },
           ticks: {
                   fontFamily:"'Arial'",
                   fontStyle:'normal',
                   fontSize:9,
                   fontColor:'#ffffff',
                   lineHeight:1,
                   precision:0,
                   stepSize:3,
                   suggestedMin: 22,
                   suggestedMax: 29
                }
        }],
    
    }
}
};

delete msg.payload;
return msg;

IIRC the colour comes from the dashboard theme. Ensure you have the Dark theme selected and refresh the page

God !! I didn't realized

Works Thanks a lot

Yves

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.