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

Chart axis options ignored

XMLWordPrintable

    • 1
    • WP Sprint 2024-I4.3 (Clones), WP Sprint 2025-I1.0 (Clones), WP Sprint 2025-I1.1 (Clones), WP Sprint 2025-I1.2 (Clones)

      The Chart API has options for axes such as set_label() and set_stepsize(). These appear to have stopped working in Moodle 4.1 onwards.

      The steps below show that the y-axis label is not set. In my tests set_stepsize() doesn't work either.

      Steps to reproduce issue

      1. Create a course. (Steps 1 and 2 can be skipped by logging into https://sandbox.moodledemo.net as teacher and going to My first course).
      2. Enrol a student.
      3. From the course participants page click on the student then click on All logs (under Reports).

      Expected results

      The y-axis has the label 'Hits'.

      Actual results

      The y-axis has no label. If you try these steps with Moodle 4.0 the label appears as expected (for example, on https://sandbox400.moodledemo.net).

            pedro.jordao@moodle.com Pedro Jordao
            leonstr Leon Stringer
            Paul Holden Paul Holden
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            2 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours, 17 minutes
                2d 2h 17m

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