Comments (6)
@varsha2409 I've got a PR open, #43, that may address your issues--any chance you could give my fork a go to see if it helps you at all?
from chartjs-node.
Hey @varsha2409 I would check to see if something is holding on to the chartNode
reference.
Often times when you see these kinds of issues it is due to a large object (like chartNode
which contains a virtual DOM) that sits high in scope and never gets dereferenced for garbage collection.
from chartjs-node.
Hey @sedouard did you find anything?
I analysed the heap dump, there are many ChartElement, Chart.Controller and other Chart related objects.
I even did a force GC after every chart is created, these elements were still present.
from chartjs-node.
@varsha2409 are you able to copy/paste the full context you're running this library in? I'm interested in seeing how it is repeatedly called. I suspect you are holding on to a references and thats why you're experiencing a leak.
from chartjs-node.
Hey guys,
I'm still having trouble with this. Calling destroy is not removing the instance of the chartNode.
I am using v1.7.1
Any insight?
return new Promise(function (resolve, reject) {
var chartNode = new Chart(_options.width, _options.height)
var options = {...}
chartNode.drawChart(options)
.then(() => {
if (_options.base64) {
// if base64 was in the query then return base64 data
return chartNode.getImageDataUrl(_options.type)
} else {
// else return the image buffer
return chartNode.getImageBuffer(_options.type)
}
})
.then(image => {
resolve(image)
})
.finally(() => {
chart.destroy()
})
.catch(error => {
reject(error)
})
})
from chartjs-node.
@tscritch I think u want to be destroying the chart instance in ur finally block? chartNode.destroy
?
from chartjs-node.
Related Issues (20)
- Stacked bar with multiples bars widths
- Can you use a version of canvas greater than alpha2? HOT 1
- create more than one image in the same ChartJSnode
- Window is undefined?
- chartjs-demo.vmpower.io is down
- It's not possible to hide the initial tooltip on bar charts. HOT 1
- Compilation errors on install
- Unhandled rejection Error: Cannot find module 'chart.js' HOT 2
- Cannot read property 'length' of null HOT 3
- ./util/has_lib.sh: line 31: pkg-config: command not found HOT 2
- TypeError: Cannot read property 'plugins' of undefined
- Tooltip
- Unable to change the grey font color to black
- Trouble with installation HOT 9
- Can't install because node-gyp HOT 1
- Any plans to maintain this library? HOT 5
- Gradient fill color
- Unable to install (node-gyp errors) HOT 3
- Live demo link is not working
- s
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chartjs-node.