Getting the Open, High, Low,Close value in a HighLow chart.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Himanshu

Getting the Open, High, Low,Close value in a HighLow chart.

Post by Himanshu » Mon Sep 16, 2002 7:45 am

Hi David:

I am using jFreeChart for writing a stock charting application and wanted to display the Open, High, Low,Close values whenever a user clicks on the chart. I know how to get the Date value by using translateJava2DtoValue method on the HorixontalDateAxis method. However, if I use the same method on the Vertical Axis, it returns only one Double value. How can I get the Open, High, Low,Close values corresponding to a MouseEvent.

jFreeChart is a great application and thanks for developing such a great app.

Thanks,

- Himanshu

David Gilbert

Re: Getting the Open, High, Low,Close value in a HighLow cha

Post by David Gilbert » Tue Sep 17, 2002 4:46 pm

The best way to handle this would be to extend the chart entity code to include a HighLowOpenClose entity. Take a look at the MouseListenerDemo1 and MouseListenerDemo2 applications for the general idea...

Regards,

DG

Locked