JFreeChart Legend Arrangement
When i was working with JFreeChart i found no way to layout the items of the legend box the way i wanted. I had no choice but to write a custom Arrangement. If anyone knows of a better way please enlighten me.
ColumnFlowArrangement can layout on both the vertical and the horizontal axis. It works by specifying the width, in items, of the initial column. The column is filled with as many labels as there is room for, then a new column will be created with the same width. The arrangement works the same way for rows.
The names of the arguments in the class can be a bit confusing but I will fix this and add factory methods to increase readability when I find the time/energy.
The class can be found at:
https://gist.github.com/bysse/6627232
ColumnFlowArrangement can layout on both the vertical and the horizontal axis. It works by specifying the width, in items, of the initial column. The column is filled with as many labels as there is room for, then a new column will be created with the same width. The arrangement works the same way for rows.
The names of the arguments in the class can be a bit confusing but I will fix this and add factory methods to increase readability when I find the time/energy.
The class can be found at:
https://gist.github.com/bysse/6627232
Comments