Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Charts - DateAxis? Or how to implement custom axes?

cshSep 19 2012 — edited Oct 8 2012
Hi,

I need to visualize data in a chart.

The data consists of a Date and an Integer.

Obviously there is no DateAxis in JavaFX.

Do you have any idea how to approach this problem?

Sample Data could be:
Map<Date, Integer> map = new HashMap<Date, Integer>();

map.put(new GregorianCalendar(2010, 1, 1).getTime(), 77);
map.put(new GregorianCalendar(2011, 1, 1).getTime(), 11);
map.put(new GregorianCalendar(2011, 6, 1).getTime(), 23);
map.put(new GregorianCalendar(2012, 1, 1).getTime(), 45);
I guess I have to create my own axis and extend from Axis<Date>.

But without proper documentation/sample it is hard to implement all those abstract methods correctly.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 5 2012
Added on Sep 19 2012
3 comments
230 views