Łukasz Rzeszotarski
Łukasz Rzeszotarski

Reputation: 6140

JFreeChart renderers (layers) order

Is it possible to set up the order of drawn renderers (layers) or request 'bring to front' on some renderer?

Such functionality would be useful when you combine areas with lines and you want have lines always 'on top'.

Upvotes: 2

Views: 1932

Answers (1)

David Gilbert
David Gilbert

Reputation: 4477

For both the CategoryPlot and XYPlot classes, the primary dataset is rendered last so it will appear at the "front". There is an option to reverse the order in which the datasets are rendered (in the case of plots having multiple datasets) via the setDatasetRenderingOrder() method. It's not quite as flexible as a "bring-to-front" option, but it does give a limited amount of control.

Upvotes: 5

Related Questions