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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0.2
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      Windows Vista 32-bit, JRE 7u11.

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              msladecek Martin Sládeček
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: