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

Graph lib text alignment issue

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.6
    • 1.9.7
    • Libraries
    • None
    • MOODLE_19_STABLE
    • 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

            timhunt Tim Hunt
            timhunt Tim Hunt
            Nobody Nobody
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Nov/09