Forums Register Login

Drawing Axes?

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1083 times.
Similar Threads
Animating independent objects?
syncronization confusion!!
Wanted: Java2D example of zooming and panning with scroll bars
Java game loop problem with timimg
Need to label a tick stop on snap to JSlider
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:12:40.