0👍
This was caused by my lack of understanding of chart.js
I was missing a needed function convertHex() that I assumed was created by my colleague and then just not used.
Basically syntax errors and missing functions led to confusing error statements.
Function:
function convertHex(hex,opacity){
hex = hex.replace('#','');
var r = parseInt(hex.substring(0,2), 16);
var g = parseInt(hex.substring(2,4), 16);
var b = parseInt(hex.substring(4,6), 16);
var result = 'rgba('+r+','+g+','+b+','+opacity/100+')';
return result;
}
- Chartjs-If condition not working for ChartJS
- Chartjs-Need to update tool tip value based on drop down filter after ajax call
Source:stackexchange.com