It's been a while since my last question, so please bear with me if I'm not following the rules. I've attached my current code and a reference image of the chart. I am completely new to working with ChartJS.
The situation is a bit unique: the client has their own software rendering the chart, and I don't have access to the original code. After hours of trial and error, I resorted to using globals to find a solution.
Each data point on the chart displays a gray label indicating the value, all currently set at 100%. Is there a way to change the color of these labels without creating a new instance of the chart?
My question: Can we use Chart.defaults.global to modify data point labels?
Thank you in advance! I'm tired of wasting time trying to figure this out. :(
Current Code:
Chart.defaults.global.defaultFontColor = "#fff";
Chart.defaults.global.defaultColor = "#fff";
Chart.defaults.scale.gridLines.color = "#fff";
Chart.defaults.scale.gridLines.zeroLineColor = "#fff";
Snapshot of Current Chart JS Image
By the way, attempting to re-render an instance of the chart hasn't yielded results for me; maybe it could work, but I might be missing something. Here's the HTML code for the pre-rendered chart extracted from Chrome developer tools and formatted for clarity.
<canvas class="tsjschart chartjs-render-monitor" id="ChartKpiTrendLine" data-tschart='{
"chartID": "ChartKpiTrendLine",
"tooltipID": "ChartKpiTrendLine_Tooltip",
"config": {
"pointLabelSize": 12,
"pointLabelColor": "#606060",
...
},
...
}' width="803" height="562" style="display: block; height: 450px; width: 643px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); cursor: default;"></div>