[Q] How to labeling the domain

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jay Chiu

[Q] How to labeling the domain

Post by Jay Chiu » Sun Dec 22, 2002 5:22 pm

I want to create a combined XY Plot chart. The Y axis is real
value, but we need to use text labels for X axis in stead of
double values. I tried to use a HorizonalSymbolicAxis with a
label string array to create CombinedXYPlot. But I got
exception in HorizonalNumberAxis::RefreshTick when it is called
from CombinedXYPlot.draw.

Does anyone know what the best approach to add text labels to
XYPlot or CombinedXYPlot is?

Thanks a lot.

Jay Chiu

David Gilbert

Re: [Q] How to labeling the domain

Post by David Gilbert » Mon Dec 23, 2002 9:57 am

Hi Jay,

I'm not aware of a good way to do this. Usually when I have non-numerical domain values, I use charts based on the CategoryDataset interface.

Regards,

DG

Jay Chiu

Re: [Q] How to labeling the domain

Post by Jay Chiu » Sun Dec 29, 2002 3:30 am

Thanks David.

I have no problem to use CategoryDataSet to create a single line/bar chart. But when I have two sets of data in two different value ranges, I have to put they on two separate charts within the same image. It seems to me that CombinedXYPlot is the only way to handle it. But CombinedXYPlot and XYPlot only take XYDataset instead of CategoryDataset.

Is there any other way to combine multiple charts together in a single image?

Thanks a lot.

Jay

Locked