-1👍
Go to the .js of the library (in my case: ‘node_modules/chart.js/dist/Chart.bundle.js’) and, in the line 12202, you will find this conditional:
if (i === me.zeroLineIndex && options.offset === offsetGridLines) {
Transform it into this:
if ((i === me.zeroLineIndex || (!isHorizontal && i === ticksLength - 1)) && options.offset === offsetGridLines) {
Then, do whatever compression or manipulation of the file you need to do to add it to your project.
It’s not the best solution, but it’s the one I came up with.
- [Chartjs]-React-chartjs-2 time adapters, "time" is not a registered scale
- [Chartjs]-Deleting and recreating an element with React
Source:stackexchange.com