By using JFreeChart, is it possible that to have a small color ball effect, when my mouse move over the graph line :
http://www.google.com/finance?q=MSFT (See the blue small ball, when you move the mouse over the graph line)
If yes, is there any demo or hints to get start implement this feature?
Thanks!
Having Small Color Ball Along Graph Line While Mouse Move
Re: Having Small Color Ball Along Graph Line While Mouse Move
You'll have to use a MouseMotionListener on the chart panel and map the x co-ordinate to a category value. Its then just a matter of painting the marker on the chart at the appropriate position for the data point value. Don't think it would be very difficult.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Having Small Color Ball Along Graph Line While Mouse Move
I did this for a client using the Overlay feature. I don't have any code that I can share right now.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Having Small Color Ball Along Graph Line While Mouse Move
Dear david.gilbert,
I follow up your blog and I saw something exciting :
http://www.jroller.com/dgilbert/?page=2 (JFreeChart and JXLayer)
I want to say WOW. and I would like to apply the same technique (JXLayer) for CrossHair implementation.
I thought I need CrossHairUI, which its functionality will be similar to MagnifierUI.
Am I in the right direction?
Thanks!
I follow up your blog and I saw something exciting :
http://www.jroller.com/dgilbert/?page=2 (JFreeChart and JXLayer)
I want to say WOW. and I would like to apply the same technique (JXLayer) for CrossHair implementation.
I thought I need CrossHairUI, which its functionality will be similar to MagnifierUI.
Am I in the right direction?
Thanks!
Re: Having Small Color Ball Along Graph Line While Mouse Move
My plan to work on this feature is as follow :


Re: Having Small Color Ball Along Graph Line While Mouse Move
I was able to implement the feature "having small color ball along graph line while mouse move"
We are using binary search to located the nearest point.
Take a look if you are interested ;
http://jstock.cvs.sourceforge.net/viewv ... iew=markup
http://jstock.cvs.sourceforge.net/viewv ... iew=markup

We are using binary search to located the nearest point.
Take a look if you are interested ;
http://jstock.cvs.sourceforge.net/viewv ... iew=markup
http://jstock.cvs.sourceforge.net/viewv ... iew=markup

-
- Posts: 8
- Joined: Sat Jun 16, 2012 3:55 am
- antibot: No, of course not.
- Location: Indonesia
- Contact:
Re: Having Small Color Ball Along Graph Line While Mouse Mov

Can you share code here to make chart like above . . .