Re:Show HN: Create Chart Images from a URL
by typpo on Wednesday March 06, 2019 @11:29AM
(#19320118)
With the Google Image Charts API shutting down [1], I set out to build a replacement service that allows developers to create PNG images by encoding chart data and other options in a single URL.
Some might prefer an interactive Javascript charting library, but this is not possible in the case of email, SMS, Slack, and so on. This image generation solution is simpler and does not require external dependencies.
This project is open source and is pretty easy to run if you do not want to rely on the QuickChart.io web service: https://github.com/typpo/quickchart
Re:Show HN: Create Chart Images from a URL
by fit2rule on Wednesday March 06, 2019 @02:26PM
(#19321810)
Thanks for this - its an awesome service.
I was just wondering if you'd seen FF Chartwell? Its a font that allows the creation of these kinds of charts, albeit it uses typographic ligatures to produce the end results ..
I've found this to be a brilliant tool for the creation of neat charts in a jiffy - just like quickchart.io, albeit without requiring a network connection.
Anyway, thought you might be curious bout Chartwell, in case you hadn't seen it already .. maybe there is some synergy for a new version in the future?
Re:Show HN: Create Chart Images from a URL
by jedberg on Wednesday March 06, 2019 @05:18PM
(#19323480)
TIL that Google Charts is shutting down. My first thought after seeing this was "how is this different than Google Charts?". Then I got to the bottom about GC shutting down.
I didn't use GC very much, but when I needed a quick chart it was super handy. Thanks for making this!
Re:Show HN: Create Chart Images from a URL
by mherrmann on Wednesday March 06, 2019 @03:19PM
(#19322363)
Looks great :-) You should charge for it. Maybe even in the interest of your users, to keep the service alive. You could leave it open source so people can self-host, or use your server for a fee for convenience.
Re:Show HN: Create Chart Images from a URL
by seanlaff on Wednesday March 06, 2019 @05:59PM
(#19323862)
I’d recommend taking a look at Vega https://vega.github.io/vega/ or its sibling Vega-lite. It exposes all of its configuration via declarative JSON. I could see it working well for a use case like this
Re:Show HN: Create Chart Images from a URL
by arielm on Wednesday March 06, 2019 @02:48PM
(#19322071)
Looks great. There have been a few projects like this that I’ve seen but yours has a good amount of flexibility.
Do you intend to monetize this somehow? I imagine that throwing a few million daily requests on something that renders images (fast) isn’t exactly free to host...
Re:Show HN: Create Chart Images from a URL
by andrethegiant on Wednesday March 06, 2019 @05:06PM
(#19323388)
Cool! You should multiply the width and height of each chart on your marketing site by `window.devicePixelRatio` so that the graphs look crisp on Retina/HiDPI displays.
Re:Show HN: Create Chart Images from a URL
by nsedlet on Wednesday March 06, 2019 @06:39PM
(#19324127)
It looks like the charts default to 500x300. It would be nice to be able to pass a parameter specifying the size of the image returned. Then I could set the width of the <img/> to be half of that to get it to show properly on retina at an arbitrary size
Re:Show HN: Create Chart Images from a URL
by nsedlet on Thursday March 07, 2019 @10:59AM
(#19329079)
Ah, I'm wrong, sorry.
I'd been inspecting the image elements to see why they were fuzzy on my retina screen, and didn't see those params - it's in the docs right there on the page though. In that case I'd just update the marketing site to fetch larger images so they look good on retina.
This is a fantastic project, by the way. The need for this comes up all the time for us (e.g. charts for emails).
Re:Show HN: Create Chart Images from a URL
by joering2 on Wednesday March 06, 2019 @01:08PM
(#19321069)
Great stuff and free :) question - you don't need to urlencode the paramteres in the URL? how so? Further - isnt that limited to 1024 chars per URI specs ?
Re:Show HN: Create Chart Images from a URL
by typpo on Wednesday March 06, 2019 @01:41PM
(#19321376)
You probably should urlencode the parameters for longer URLs and chart definitions containing special characters. For simpler examples we can get away without URL encoding.
The server is configured to accept up to ~64kb URLs. Some browsers have built-in limitations that range from 5120 characters (IE 11) to 64k [1]. Of course, a URL that large becomes very unwieldy. Maybe I should add a way to save charts to a short url.
Re:Show HN: Create Chart Images from a URL
by koolba on Wednesday March 06, 2019 @02:15PM
(#19321700)
Could also add gzip/deflate/base64 of the query parameter. For many JSON payloads the compression ratio can be 10:1. If it’s all happening client side then the processing cost is pushed to the browser so an added decompress wouldn’t change much.
Re:Show HN: Create Chart Images from a URL
by typpo on Wednesday March 06, 2019 @12:39PM
(#19320829)
Seems to be a strange issue with transparent images on certain devices. I've corrected this and also added an optional "bkg" param to set the background color.
Re:Show HN: Create Chart Images from a URL
by ggm on Wednesday March 06, 2019 @03:14PM
(#19322315)
google visualisation api remains. its in-browser .js, heavier weight, but it works. So this is a replacement for throwing data at a central chart render engine, not a replacement for all current google charting methods. (disclaimer: I've built sites which depend on the google chart & visualisation api)
Re:Show HN: Create Chart Images from a URL
by typpo on Wednesday March 06, 2019 @04:38PM
(#19323116)
It's free, open source, and no watermark - so QuickChart compares favorably in that regard!
In terms of functionality, ChartURL is also built on Chart.js, so charting capabilities should be roughly equivalent. They've added the nice feature of being able to save your charts to a short URL.
Some might prefer an interactive Javascript charting library, but this is not possible in the case of email, SMS, Slack, and so on. This image generation solution is simpler and does not require external dependencies.
This project is open source and is pretty easy to run if you do not want to rely on the QuickChart.io web service: https://github.com/typpo/quickchart
I welcome your thoughts and feedback.
[1]: https://groups.google.com/forum/#!topic/google-chart-api/rZt...
I was just wondering if you'd seen FF Chartwell? Its a font that allows the creation of these kinds of charts, albeit it uses typographic ligatures to produce the end results ..
https://www.fontshop.com/families/ff-chartwell
How to use it:
https://vimeo.com/41772735
I've found this to be a brilliant tool for the creation of neat charts in a jiffy - just like quickchart.io, albeit without requiring a network connection.
Anyway, thought you might be curious bout Chartwell, in case you hadn't seen it already .. maybe there is some synergy for a new version in the future?
https://api.restcharts.com/
https://github.com/whatl3y/restcharts
A competitor that appears to be profitable and doing well is https://charturl.com/.
I didn't use GC very much, but when I needed a quick chart it was super handy. Thanks for making this!
Do you intend to monetize this somehow? I imagine that throwing a few million daily requests on something that renders images (fast) isn’t exactly free to host...
I'd been inspecting the image elements to see why they were fuzzy on my retina screen, and didn't see those params - it's in the docs right there on the page though. In that case I'd just update the marketing site to fetch larger images so they look good on retina.
This is a fantastic project, by the way. The need for this comes up all the time for us (e.g. charts for emails).
The server is configured to accept up to ~64kb URLs. Some browsers have built-in limitations that range from 5120 characters (IE 11) to 64k [1]. Of course, a URL that large becomes very unwieldy. Maybe I should add a way to save charts to a short url.
[1] https://stackoverflow.com/questions/417142/what-is-the-maxim...
There isn't a limit of URI length per the relevant 'specs'. There are generally limits imposed by _browsers_, and probably web servers too tho.
edit: It is working fine now. No more red backgrounds.
[0]: http://web.archive.org/web/20170201170400/http://chartspree....
Glad that it is open source so people can self host it.
This replaces the deprecated image chart methods.
In terms of functionality, ChartURL is also built on Chart.js, so charting capabilities should be roughly equivalent. They've added the nice feature of being able to save your charts to a short URL.
Just added it to https://github.com/fiatjaf/awesome-loginless