Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091756

BarChart and CategoryAxis weird types

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • fx2.0.1, fx2.0.2, fx2.0.3, fx2.1
    • javafx
    • Windows 7 64-bit, Java 7 1.7.0_02 64-bit, JavaFX 2.0 2.1 b12 64-bit

    Description

      What's the real purpose and reason of having BarChart<X, Y> when Category axis is a final class that extends Axis<String>?

      This forces bar charts to have one of their axis that has String as its type (ie: either BarChart<String, Y> or BarChart<X, String>)
      There should be no real reason why CategoryAxis requires to use String as a tuype, a category could be any type that can be sorted and have a unique hashValue (ie: Integer, others)...

      CategoryAxis extends Axis<String> should become CategoryAxis<T> extends Axis<T>.
      It should also feature the same label formatter utility that ValueAxis has but tailored to the generic "T" type (instead of a "T extends Number" type). Default formatter could call String.valueOf() or T.toString().

      Attachments

        Activity

          People

            Unassigned Unassigned
            fbouyajfx Fabrice Bouyé (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Imported: