Creating beautiful charts with JRuby and JFreeChart

headius | 63 points

Wow, the first chart on that web page is really, really ugly. It has these weird 3-d effects that look like from 2001. All it's missing are reflections...

tasuki | 16 hours ago

Being able to add an interpreted script engine to a Java application is a super-power for some uses. I embedded a Jython (Python in the JVM) command line into a Java Swing app to provide a level of flexibility that I never could with a GUI. Every time I look at JRuby I wonder if Jython was the right choice. It is too late now but JRuby looks awfully nice.

nritchie | 14 hours ago

> Everyone loves pie!

Oh gosh, no! Count me among those who greatly dislike pie charts in almost every context.

"Almost never use a pie chart for data"

https://theconversation.com/heres-why-you-should-almost-neve...

https://news.ycombinator.com/item?id=38912534

npongratz | 17 hours ago

JFreeChart is quite the throwback! Modern JavaScript chart libraries are much better for our users however. On the JVM, I've been successful running JS with GraalJS for the backend. We run GraalJS for https://docs.chartsql.com/ with the output being Apache ECharts (https://echarts.apache.org/en/index.html) for the browser. ECharts can generate SVG server side also, though I haven't tested it in production.

rorylaitila | 3 hours ago

That’s really impressive! Not the chart itself, but seeing how easy it is to use any existing Java library from within a Ruby codebase is super cool.

Ruby already has a pretty incredible gem ecosystem but having all things Java available too really adds tremendous utility.

Love JRuby. Thanks for all of the hard work headius!

brightball | 16 hours ago

Very cool. I'm one of the few (it seems) who likes these styles of chart, so that was a nice surprise.

I love Ruby, and one of my few qualms about using it is that it doesn't really have any cross-platform GUI libraries. Someday I'll try building one in JRuby...

sabslikesobs | 8 hours ago

tbh those old 3d charts just crack me up - i remember seeing stuff like that in early office programs. you ever feel like some trends just stick around for way too long even when better stuff exists?

gitroom | 13 hours ago

One word, Tufte; read them all, then read them again.

codr7 | 13 hours ago

Why use C, Python, or JavaScript to generate charts for your Ruby applications? Use JRuby and it's so much easier!

headius | 2 days ago

article complains about a ruby gem(Charty) calling a python library(matplotlib) yet author is running Ruby in Java so they can access some Java library!

knowitnone | 17 hours ago

https://github.com/ruby-numo/numo-gnuplot

There's always good 'ol Gnuplot and it's many wrappers... This one looks nice.

dismalaf | 16 hours ago