CombinedDomainXYPlot Renderer Bug?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
benlawry
Posts: 2
Joined: Tue Dec 21, 2010 7:17 pm
antibot: No, of course not.

CombinedDomainXYPlot Renderer Bug?

Post by benlawry » Tue Dec 21, 2010 7:25 pm

I have a project that I am using JFreeChart to display infrasound waveform data with. In this project, I want a single instance of ChartPanel to show individual waveform signals. I've been able to get this working just fine, but when I remove waveform data, I start to have problems.

I have a CombinedDomainXYPlot that I'm using to display all of the individual sets of waveform data, with my own custom implementations of XYDataSet and XYPlot to store and render the data, respectively. Each instance of my custom XYPlot class represents a single custom XYDataSet. I also set up a mouse listener that lets me select individual waveform plots and remove them from the CombinedDomainXYPlot. I can remove any of the sub plots just fine, except for the last one. If I remove the last plot, all of the other plots lose their data and render nothing. Has anyone seen anything like this before?

barbarius
Posts: 74
Joined: Tue Jul 27, 2010 9:33 am
antibot: No, of course not.

Re: CombinedDomainXYPlot Renderer Bug?

Post by barbarius » Tue Dec 21, 2010 8:20 pm

i dont see anything dangerous within CombinedPlot remove method. might be something with your code

benlawry
Posts: 2
Joined: Tue Dec 21, 2010 7:17 pm
antibot: No, of course not.

Re: CombinedDomainXYPlot Renderer Bug?

Post by benlawry » Tue Dec 21, 2010 8:58 pm

I've been able to do a little more digging into this. When I remove the last plot, it looks like the DateAxis that the CombinedDomainXYPlot had been set to gets removed. If I just make sure to add the domain axis back to the plot every time I remove a waveform plot, it works fine. I'm not explicitly removing the date axis from the CombinedDomainXYPlot anywhere in my code, so I'm still scratching my head over this one... but at least it works as I want it to now :)

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Re: CombinedDomainXYPlot Renderer Bug?

Post by skunk » Tue Dec 21, 2010 9:52 pm

Did you try creating a DateAxis and passing it to the CombinedDomainXYPlot() constructor?

Locked