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

Graph lib text alignment issue

    XMLWordPrintable

    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.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

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