- Issue created by @fox mulder
- 🇮🇳India dineshkumarbollu
Hi @fox mulder
I Tested the issue in Simpletest.me, i am not getting any error related to JS.
- 🇩🇰Denmark Steven Snedker
I had the error. I corrected it.
In /simpleads/js/simpleads.charts.js
It says
function getLineChartOptions(xAxesLabel, yAxesLabel) { return { type: 'line', data: { labels: [], datasets: [] }, options: { responsive: true, tooltips: { mode: 'index', intersect: false, }, hover: { mode: 'nearest', intersect: true }, scales: { xAxes: [{ display: true, scaleLabel: { display: true, labelString: xAxesLabel } }], yAxes: [{ display: true, scaleLabel: { display: true, labelString: yAxesLabel } }] } } }; };
Guided by the Chart-js 3.x migration docs, I changed it to
function getLineChartOptions(xAxesLabel, yAxesLabel) { return { type: 'line', data: { labels: [], datasets: [] }, options: { responsive: true, plugins: { tooltip: { mode: 'index', intersect: false } }, hover: { mode: 'nearest', intersect: true }, scales: { x: { display: true, title: { display: true, text: xAxesLabel } }, y: { display: true, title: { display: true, text: yAxesLabel } } } } }; }
and it worked.
It should probably be further updated, but doing this, I got rid of the js errors.