Estoy tratando de truncar la etiqueta del eje x en chart.js pero obtengo un error (value.substr no es una función) y no sé cómo resolverlo. También utilicé la función getLabelForValue pero sigo recibiendo un error... ¿alguien puede ayudarme? aquí está mi código
const gridConfig = { display: false, borderWidth: 0, } const xAxis = { barPercentage: 0.4, ticks: { callback:function(value){ return value.substr(0,6) }, color: '#313640', padding: 9, font: { size: 12, weight: 600 } }, grid:gridConfig, }; const timeManagmentData = { labels: MeetingsAdjusted, datasets: [{ barThickness: 10, borderRadius: 100, backgroundColor: gradientBg2, borderColor: gradientBg2, label: 'Meetings Score', data: avgAnswerFeedback, }] } const timeManagmentConfig = { type: 'bar', data: timeManagmentData, options: { scales: { y: { ticks: yAxisTicks_stepSize20, grid:gridConfig }, x: xAxis, }, plugins: { tooltip, legend, }, animation, }, } const myChart = new Chart( ctx3, timeManagmentConfig, );