• Post Reply Bookmark Topic Watch Topic
  • New Topic

Drawing Axes?  RSS feed

 
Siegfried Heintze
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to plot some data and I would like to draw dates on the horizontal axis and price on the vertical using Swing.

I have already implemented pan and zoom.

Can anyone point me to some code that contains the logic to select tick marks at asthetically pleasing intervals and put the labels for each tick mark on so they don't overlap each other and adjust accordingly so that when I zoom in, I get tick marks at smaller intervals?

I'm sure this code has been written many, many times before and it seemed silly for me to write it again for my swing applet.

Thanks!
Siegfried
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used these, but there are free libraries out there for this. Something like JFreeChart or JGraph (I may have the names off a bit), may help you out here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!