Open oscargus opened 8 years ago
For the other readers:
I'm currently fearing that gral is dead. But if gral produces better looking results, use that. We'll surely manage pushing it to maven central somehow.
JFreeChart probably produces better looking results but as stated in the comparison it is 2.6 MB vs 300 kB. Not sure if it is worth to add 2.6 MB of dependencies for a few plots... But then, I'm not really sure how it works later on. Is everything included in the Jabref jar or only the used parts?
xchart might also be an option: https://github.com/timmolter/XChart http://knowm.org/open-source/xchart/
Example gallery: http://knowm.org/open-source/xchart/xchart-example-code/
Small footprint and available on Maven. Only obvious drawback is that there's currently no pie chart (which I had some plans for).
@PieCharts: Letting speak the master Edward Tufte himself:
A table is nearly always better than a dumb pie chart; the only worse design than a pie chart is several of them, for then the viewer is asked to compare quantities located in spatial disarray both within and between charts [...] Given their low density and failure to order numbers along a visual dimension, pie charts should never be used.
So better just use bar charts :+1:
The particular use case was to illustrate the proportion of different entry types, for which I think a pie chart will do an excellent job.
One should note that there's a difference between "scientific" visualization and more "colorful" visualization, where I'd say that any statistics related to bibtex-files would fall in the latter category... It should just look nice...
The jar is always packaged completely in the resulting jar. JabRef is already large (approx 23 MB), then 10% more is not an issue.
Currently JabRef is not as colorful as version 2.11. See https://github.com/koppor/jabref/issues/40 for color examples for JabRef 3.0. - Don't know how colorful diagrams fit into our nearly flat style.
Colorful may be the wrong word. The point is that whatever statistics we can produce from a database will only be used for fun, not to actually analyze anything important (as far as I can tell).
Got it :). Just use the library where you think it is the most convenient to use. GRAL will be on maven central soon. A first look reveals that GRAL is more Java-like than XChart which seems to be more C-like. Don't know about JFreeChart.
In JavaFX a lot of these things are supported out of the box. Maybe we should postpone complex diagrams and only print data without visualization, doing preparation work.
May make sense to wait until JavaFX indeed. There may show up some printed statistics though.
I was maybe thinking of adding a database information dialog, showing different statistics about the database (just because I can). It would be nice to plot some things, so any opinions on adding a chart library and in that case which?
http://www.jfree.org/jfreechart/ seems to be the most competent, but then it is rather large and also supports lots of things which is not of primary interest.
https://github.com/eseifert/gral seems more suitable in many ways, but no Maven support (yet).