Live data from Hacker News

Creating beautiful charts with JRuby and JFreeChart

blog.headius.com

21–26 of 26 posts

Re: Creating beautiful charts with JRuby and JFreeChart

#21
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...

Re: Creating beautiful charts with JRuby and JFreeChart

#22
post #20

> 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

3d pie charts are literally the devil. It's 3d pie charts, dot charts, pie charts, and any chart that has the origin set to greater than 0 in descending order of evilness. We need a ## anniversary edition of Lying with Statistics.

If your uptime (or your percentage score in a class) is best understood/consumed on a chart with an origin of zero, you’re having a very bad time.

Re: Creating beautiful charts with JRuby and JFreeChart

#23

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.

IMHO it is one of the big tragedies of modern IT history, that JavaScript and Python 'own' the market for scripting languages in the mainstream.

From a pure technical perspective, I would guess JRuby or one of the JavaScript implementations would have been a better choice for scripting, especially given the poor state of Jython.

From a pragmatic perspective and what your users are mostly able to figure out, Python might have been the best choice. I even saw software developers with years of experience in imperative languages struggling to understand Rubys blocks...

Out of pure interest: What was the purpose of the Java application and which aspects did you allow the users of the application to script with Jython?

Re: Creating beautiful charts with JRuby and JFreeChart

#24
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.

Re: Creating beautiful charts with JRuby and JFreeChart

#25
post #20

Earlier quoted context omitted.

3d pie charts are literally the devil. It's 3d pie charts, dot charts, pie charts, and any chart that has the origin set to greater than 0 in descending order of evilness. We need a ## anniversary edition of Lying with Statistics.

If your uptime (or your percentage score in a class) is best understood/consumed on a chart with an origin of zero, you’re having a very bad time.

What you should really track and chart is your downtime.

Re: Creating beautiful charts with JRuby and JFreeChart

#26
post #20

Earlier quoted context omitted.

3d pie charts are literally the devil. It's 3d pie charts, dot charts, pie charts, and any chart that has the origin set to greater than 0 in descending order of evilness. We need a ## anniversary edition of Lying with Statistics.

If your uptime (or your percentage score in a class) is best understood/consumed on a chart with an origin of zero, you’re having a very bad time.

If you’re comparing your uptime before and after a fix, you’re lying to everyone by not showing the origin.

Also why are people looking at uptime unless there was an outage? At which point you do need to show zero anyway.

Post reply on HN