ankane/chartkick

[Question] Without rails

noraj opened this issue · 4 comments

noraj commented

I was wondering if there was a way to use chartkick without RoR or any web server?
For example generating a chart to SVG/PNG/etc. or just creating standalone HTML file?

Hey @noraj, Chartkick can't generate SVG/PNG files directly. You can use Chartkick.js with a standalone HTML file.

noraj commented

Yeah but wanted a ruby wrapper.

Hi @noraj. If you want a ruby wrapper, but don't want to use a big framework like Rails, try to use Sinatra to generate just the HTML file, and generate the chart with chartkick in a similar way as if it was in Rails. Would it solve your needs?

noraj commented

I fear all example and documentations are provided for template languages like ERB, the way to require the gem seems different, etc.
I made a PoC with python - pygal yesterday, but python is far less flexible than ruby, and pygal is not very customizable and flexible either. The problem with ruby is that all charts/plot lib are targeting Rails and there are no well maintained lib for pure ruby generation without web in mind.