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

Graph lib text alignment issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.7
    • 1.9.6
    • Libraries
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      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.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.