svg-graph2 icon indicating copy to clipboard operation
svg-graph2 copied to clipboard

Add a Histogram

Open dansbits opened this issue 6 years ago • 5 comments

I think a histogram would be a valuable addition to the available charts. I got started on a prototype yesterday but wanted to gather feedback before putting more work in. Does a histogram sound like a good idea? It can technically be accomplished with the existing bar chart but requires you to calculate the bin count and size yourself.

Here is a link to my fork with my start on a histogram. It's pretty functional at this point but doesn't handle all of the options that other charts do. Let me know what you think. https://github.com/dansbits/svg-graph2/tree/histogram-chart

dansbits avatar Sep 05 '19 01:09 dansbits

Hi, I have no objections. Did you already have a look at the C3js integration I did? C3js supports a lot more graph types. But as it heavily depends on javascript the real svg will only be rendered by the browser when viewing it.  was wondering if that is also compatible with iruby / jupyter.

lumean avatar Sep 05 '19 06:09 lumean

I believe jupyter should be able to work with C3js but I'd have to look into the details of how to make the JS available in the notebook. It looks like C3 doesn't currently support histograms though. ☹️ I found this issue requesting histograms but it's unresolved.

https://github.com/c3js/c3/issues/750

I think I'll keep going down the path of building it in Ruby if that sounds alright. Any thoughts on minimum functionality to merge into the repo?

dansbits avatar Sep 06 '19 14:09 dansbits

no not really. It would be nice if you could create / extend the tests and add an example to the examples folder.

lumean avatar Sep 09 '19 12:09 lumean

Sounds good. I'll get some base functionality in place and see if I can write some more detailed tests. As well as adding an example. Thanks!

dansbits avatar Sep 09 '19 15:09 dansbits

Hi Dan, is this something you still want, and do you have examples of the type of output that you want from this?

t12nslookup avatar Jan 15 '21 09:01 t12nslookup