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

horizontalGridLines of XYChart have an error

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      if our code have this line "setHorizontalZeroLineVisible(false);"
      the HorizontalZeroLine will be visible,
      but if our code have this line "setHorizontalZeroLineVisible(true);"
      the HorizontalZeroLine will be invisible.
      Obviously,the actual situation is opposite to the expected situation.
      And,I found that the class "XYChart" in package "javafx.scene.chart" hava these lines:

                      if ((y!=yAxisZero || !isHorizontalZeroLineVisible()) && y >= 0 && y < yAxisHeight) {
                          horizontalGridLines.getElements().add(new MoveTo(left,top+y+0.5));
                          horizontalGridLines.getElements().add(new LineTo(left+xAxisWidth,top+y+0.5));
                      }

      I think it should be replaced with these codes:

                      if ((y!=yAxisZero || isHorizontalZeroLineVisible()) && y >= 0 && y < yAxisHeight) {
                          horizontalGridLines.getElements().add(new MoveTo(left,top+y+0.5));
                          horizontalGridLines.getElements().add(new LineTo(left+xAxisWidth,top+y+0.5));
                      }



      FREQUENCY : always


            pnarayanaswa Praveen Narayanaswamy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: