开发者

Run Flot, Javascript on Server?

开发者 https://www.devze.com 2023-01-17 11:20 出处:网络
I would like to use a Javascript library (Flot) to generate charts in my application.Most of the time, the charting will be performed by开发者_JAVA技巧 clients.However, I can see that in some cases, w

I would like to use a Javascript library (Flot) to generate charts in my application. Most of the time, the charting will be performed by开发者_JAVA技巧 clients. However, I can see that in some cases, where the same charts would be frequently accessed by all clients, it would be better to generate those charts on the server, cache them, and serve them as images.

How could I go about executing Javascript from a script that runs on the server? Can Flot be used to generate PNG's?


This should be possible with Node.js and node-canvas. Node-Canvas can spit out PNGs for your cached graphs.

0

精彩评论

暂无评论...
验证码 换一张
取 消