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

com.sun.javafx.charts.Legend fails to layout properly for small layout areas

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • fx2.0.2
    • javafx
    • Windows Vista 32-bit, JRE 7u11.

      com.sun.javafx.charts.Legend fails to layout properly for small layout areas. The problem can be replicated by populating a LineChart with data when its width is smaller than the required width to hold the the legend labels + symbol. The result is that computePrefWidth(int) and computePrefHeight(int) of Legend returns a non-zero layout boundary rectangle but the symbols are all layout/positioned in the top left corner and the labels are not visible, i.e. the legend area remains empty apart from misaligned symbols in the top left corner of the legend bounding box. If the chart is resized the legend layout starts to work again when the chart boundaries are large enough to fit the legend. If the chart is resized again to a smaller layout area the legend is now rendered correctly but not all of its content is visible due to the restricted size of the container. Hence, this problem only appears if the chart and legend layout boundaries are small at the time of populating the chart with data.

            msladecek Martin Sládeček
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: