SeanSobey / ChartjsNodeCanvas

A node renderer for Chart.js using canvas.
MIT License
230 stars 79 forks source link

Cannot read property 'register' of undefined #69

Closed vcomplyRahul closed 3 years ago

vcomplyRahul commented 3 years ago

image

when we adding datalabels plugin then throw error expp TypeError: Cannot read property 'register' of undefined at ChartJSNodeCanvas.initialize (C:\angular\b-pdf\node_modules\chartjs-node-canvas\src\index.ts:246:22) at new ChartJSNodeCanvas (C:\angular\b-pdf\node_modules\chartjs-node-canvas\src\index.ts:93:24) at createChart (C:\angular\b-pdf\Risk-PDF\pdfRisk.js:2334:33) at sampleChart (C:\angular\b-pdf\Risk-PDF\pdfRisk.js:2192:28) at processTicksAndRejections (internal/process/task_queues.js:93:5) at Object.exports.mainFunction (C:\angular\b-pdf\Risk-PDF\pdfRisk.js:39:30) at exports.handler (C:\angular\b-pdf\Risk-PDF\index.js:72:24) at InProcessRunner.run (C:\angular\b-pdf\node_modules\serverless-offline\dist\lambda\handler-runner\in-process-runner\InProcessRunner.js:211:24) at LambdaFunction.runHandler (C:\angular\b-pdf\node_modules\serverless-offline\dist\lambda\LambdaFunction.js:355:20) at hapiHandler (C:\angular\b-pdf\node_modules\serverless-offline\dist\events\http\HttpServer.js:533:18) at module.exports.internals.Manager.execute (C:\angular\b-pdf\node_modules\@hapi\hapi\lib\toolkit.js:45:28) at Object.internals.handler (C:\angular\b-pdf\node_modules\@hapi\hapi\lib\handler.js:46:20) at exports.execute (C:\angular\b-pdf\node_modules\@hapi\hapi\lib\handler.js:31:20) at Request._lifecycle (C:\angular\b-pdf\node_modules\@hapi\hapi\lib\request.js:312:32) at Request._execute (C:\angular\b-pdf\node_modules\@hapi\hapi\lib\request.js:221:9). Please provide us a way to resolve this issue

vcomplyRahul commented 3 years ago

using chartjs 2.x.x version working fine