...although it was set and datasets are set to null:
See attached image.
Logged In: YES
Attached modified XYPlot.java to properly display
noDataMessage and Plot.java to support
noDataMessagePaint nad secondaryNoDataMessage.
Logged In: YES
I've incorporated the 'no data' message changes for the
primary dataset, with a small change. I've created a new
isEmpty(...) method in the DatasetUtilities class to check
whether or not the dataset has any data. Your code checks
- the dataset is not null;
- there is at least one series;
- there is at least one item in the first series;
This could fail where there are two or more series, but the first
contains no items.
I'm also still wondering about having a message for the
secondary dataset. How do you make sure it doesn't overlap
the message for the primary dataset when neither has data?
good point regarding isEmpty(). I'm only displaying one series... Regarding the message for the secondary dataset:
What about shifting the primary message up and the secondary message down by fontheight()?
I'm only using the primary message, so this was added just for completness as I started digging through the code
to fix the no data message not being displayed.
Ok, shifting the secondary data message down a little bit did
the trick. Just change
- (bounds.getHeight() / 2)
in drawSecondaryNoDataMessage(...). Secondary message
is the displayed slightly below the middle.
Complete line is:
float y = (float) (area.getMinY() + (area.getHeight() /
2) + bounds.getHeight());