wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes For those who've used JClass Chart, how do I load data using a TableModel for x axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "For those who Watch "For those who New topic
Author

For those who've used JClass Chart, how do I load data using a TableModel for x axis

Meghna ks
Ranch Hand

Joined: Mar 15, 2001
Posts: 122
Hi
I've been using the JClass Chart and I load the data to the Chart by using a TableModel by extending the AbstractTableModel class. But the problem I'm facing is that only the values for the Y axis are generated according to the requirement whereas the X axis values are generated randomly by the Chart. If anyone has experimented with this before, please do let me know.This is an important requirement and I'd greatly appreciate any help.
Thanks
Meghna
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Meghna,
As I understand it, the JCChart automatically generates the X axis values. If you want something else then you need to have the chart use PointLabels. Look at the following example at how I made the JCChart use PointLabels.

The bolded code on the bottom of the constructor is the important stuff.
Enjoy,
Manfred.
Meghna ks
Ranch Hand

Joined: Mar 15, 2001
Posts: 122
Thanks a lot Manfred
I really appreciate your help. I'll try out the logic with my data Model and see if I can come up with good results. Once again, I appreciate your help a lot.
Thanks
Meghna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: For those who've used JClass Chart, how do I load data using a TableModel for x axis