• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic