Troubleshooting
Overview
This article is a starting point for diagnosing and resolving issues you might encounter while implementing the library.
For almost any issue, enabling the debug mode is the most effective way to gather more information.
API-specific troubleshooting
If your issue is related to a specific API, check the dedicated guides, as they cover the most common issues.
Memory leaks
If you observe increasing memory consumption that never decreases, you may have a memory leak. Here are the recommended steps to troubleshoot the issue:
1. Verify proper chart cleanup logic
The most common source of memory leaks occurs when the chart widget is removed, but its resources are not fully released because your code holds a reference to it. Ensure your cleanup code does all of the following:
- Calls the
removemethod when trying to remove the chart. - Unsubscribes from all data subscriptions.
- Removes any references to the chart or parts of its API from your application's scope.
For a technical background in JavaScript, see the Memory management guide.
2. Check for high-frequency data updates
High memory consumption can also be caused by an excessive number of real-time updates. This forces the library to a constant, resource-intensive re-rendering.
- Enable debug mode to see the flow of data. Refer to our guide: How to enable debug mode.
- In the debug logs, look for a very high volume of updates in a short period.
If you find excessive updates, the solution is to throttle or batch them on your end before sending them to the library.
3. Isolate the library component
Once you've confirmed that your cleanup logic and data flow are correct, check if the issue is caused by the library or your application.
- Create an isolated test page with only the library and the simplest configuration needed.
- Remove all other frameworks, components, and third-party scripts from the page.
- Monitor the memory usage.
If the memory leak disappears, the issue lies within your application or another integration, not the library. You should investigate your application's code to find the source of the leak.
If you can still reproduce the leak with only the library on a blank page, proceed with the following step.
4. Record memory heap snapshot
If you have completed all the steps above and are confident the issue lies within the library, capture the leak-proof and report a GitHub issue.
- Open your browser's Developer Tools and go to the Memory tab.
- Click the record button to take a heap snapshot.
- Open an issue on our GitHub repository.
- Attach the snapshot file you recorded.
Still stuck?
If you did not find a solution to your issue in the documentation, report it through GitHub Issues 🔐 (access is restricted).
To help us and the community understand your issue, include the following details:
- A clear and concise description of what the issue is.
- Step-by-step instructions to reproduce it.
- The full logs with debug mode enabled.
- The symbol your issue is related to.