Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20855

Graph lib text alignment issue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.6
    • Fix Version/s: 1.9.7
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The text alignment code in graphlib has a bug that messes up the alignment of x axis lables when some have descenders, like 'May', and others don't, like 'Jun'.

      The issue is that gd draws text base-line aligned, but the graphlib measurement code measures to the bottom of the bounding box, not the baseline of the text.

      I think the attached simple patch is the correct fix.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            Looks good, if it works for you I say check it in! Thanks!

            Show
            dougiamas Martin Dougiamas added a comment - Looks good, if it works for you I say check it in! Thanks!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Nov/09