I'm attempting to customize the legend in my Chartjs chart, but I'm facing an issue where I can't seem to change the font color. What I want to achieve is having the font color in white while keeping the individual item colors intact in the bar chart. Additionally, I'd like them to be arranged horizontally instead of vertically as shown in the image below: https://i.sstatic.net/aQImo.png
index.html
<div id="title"></div>
<div id="content">
</div>
<div>
<canvas id="myChart" style="width: 100%; height: auto;"></canvas>
</div>
<div id="js-legend" class="chart-legend"></div>
CSS
.chart-legend li span{
color: red !important;
display: block;
width: 12px;
height: 12px;
margin-right: 5px;
list-style-type: none !important;
}
This is how it looks currently: https://i.sstatic.net/ipunu.png