[XYPlot][ChartEditor] How to customize ChartEditor for a double range axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
Eirik
Posts: 3
Joined: Thu Apr 24, 2014 7:42 pm
antibot: No, of course not.

[XYPlot][ChartEditor] How to customize ChartEditor for a double range axis

Post by Eirik » Mon Dec 17, 2018 6:18 pm

Hi all,
I have a double range axis XYPlot (main on left, secondary on right) and when I access to the ChartEditor panel, i can only modify parameters for the main range axis.
How can I customize the ChartEditor panel to add an extra tab "Secondary Range Axis" giving access to the secondary range axis parameters ?
Most of classes building DefaultChartEditor Panel are not public and so, not usable to build a specific ChartEditor.

Thanks for your help.
Regards

John Matthews
Posts: 482
Joined: Wed Sep 12, 2007 3:18 pm

Re: [XYPlot][ChartEditor] How to customize ChartEditor for a double range axis

Post by John Matthews » Tue Dec 18, 2018 12:25 pm

While the relevant classes aren't public, they do have package-private access in org.jfree.chart.editor. You'll have to clone the repository, but you should be able to modify DefaultPlotEditor::createPlotTabs to (conditionally) include as many additional instances of DefaultAxisEditor as needed.

Eirik
Posts: 3
Joined: Thu Apr 24, 2014 7:42 pm
antibot: No, of course not.

Re: [XYPlot][ChartEditor] How to customize ChartEditor for a double range axis

Post by Eirik » Fri Dec 21, 2018 4:44 pm

Thx for your help.
I'll clone all classes from the Editor package in my project and change the code of createPlotTabs to add a tab per RangeAxis contained in the rangeAxes map.

Post Reply