In salesforce Iam using Chartjs #12072
Unanswered
rrbrishabh
asked this question in
Q&A
Replies: 1 comment
|
This error usually happens because Chart.js is not properly loaded or the version changed. Here are the solutions: Solution 1: Check if Chart.js is loaded Check if Chart is available in the browser console. Solution 2: Use the correct import syntax In Salesforce Lightning Web Components, use loadScript to load Chart.js from static resources. Solution 3: Check for multiple Chart.js instances If you see "Chart is already defined", destroy existing charts first. Solution 4: Use Chart.js from CDN If the static resource approach does not work, try loading from CDN. Solution 5: Check Salesforce console errors Open browser console and check for network errors, syntax errors, or CSP violations. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am not able to use chartjs file previouly is working but now its showing still same error:
TypeError: window.Chart is not a constructor
please help me with this
All reactions