Question

I would like to present graphs in my rails app. I was able to find a lot of projects that could do that, as Chartkick. But I would like to have charts like this one, where I max lines and columns. Is there any project that is able to draw this kind of graphs? I was not able to find anything on chartkick's website or Google.

Was it helpful?

Solution 2

Google Visualization Combo charts should be able to do what you are looking for

Have a look at documentation for more info

Js Fiddle

OTHER TIPS

You could do it like this using chartkick:

= column_chart(@your_data, library: { :series => { 0 => { type: "line"} } })

This will set the first series in @your_data as the line chart. Of course you can set every other series in that as well just exchange the "0" for another number.

I hope this helps!

This can be done in Javascript using something like:

new Chartkick.AreaChart("chart", [{"name":"Series 1","data":{"2013-03-11 00:00:00 -0700":3,"2013-03-31 00:00:00 -0700":5}},{"name":"Series 2","data":{"2013-02-10 00:00:00 -0800":0,"2013-02-17 00:00:00 -0800":0}},{"name":"Series 3","data":{"2013-02-10 00:00:00 -0800":0,"2013-02-17 00:00:00 -0800":1}}], { library: { series: { 0: { color: "blue" }, 1: { type: "line", color: "yellow" }, 2: { type: "line", color: "green" } } } }  );

Series 2 and 3 will be lined, and Series 1 will be an area chart. :)

(This is primarily a response to JNM's question on Timo's answer, but I can't reply to comments at the moment. :/ )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top