Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow generating chart images on serverside. (node.js) #397

Open
itzTheMeow opened this issue Mar 17, 2023 · 3 comments
Open

[Feature] Allow generating chart images on serverside. (node.js) #397

itzTheMeow opened this issue Mar 17, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@itzTheMeow
Copy link

Feature Description

Currently the library only works in the browser. It would be cool if the library could be used to generate a static chart image in nodejs too.

To Do

maybe a separate function to generate an image, with parameters for screen height/width, what timeframe to show on the chart, zoom level, and the data to show on the chart

@liihuu
Copy link
Member

liihuu commented Mar 21, 2023

It's too difficult to use some browser specific APIs.

@liihuu liihuu added the help wanted Extra attention is needed label Apr 15, 2023
@chaitanyabd
Copy link

Using puppeter may be an option for this. Recently used it for generating server side graphs and saving to image.

It's basically the same as client side coding so this isn't really an issue klinecharts team needs to bother with.

@itzTheMeow
Copy link
Author

It works, and that's my solution currently, however puppeteer/chromium is very heavy on both disk space and resource usage just for a chart image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants