3 Replies Latest reply on Oct 8, 2012 4:33 PM by James_D

    Charts - DateAxis? Or how to implement custom axes?


      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.