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

ChartJS tooltip not working after 3.4 upgrade

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to http://YOURMOODLESITE/lib/tests/other/chartjstestpage.php.
      2. Open the Javascript console in the browser's developer tools.
      3. Hover over the pie and donut chart.
        • Make sure it does not display the error that has been reported in the issue's description.
        • Make sure the borders are white, not that ugly grey color.
      Show
      Go to http://YOURMOODLESITE/lib/tests/other/chartjstestpage.php . Open the Javascript console in the browser's developer tools. Hover over the pie and donut chart. Make sure it does not display the error that has been reported in the issue's description. Make sure the borders are white, not that ugly grey color.
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-61218-master

      Description

      This bug has been reported by Sylvain.

      After upgrade to 3.4 the tool tips on pie and donut charts stop working, the chart is generated but when you hover over the chart, you get the following JS error:

      chartjs-lazy.js:281 Uncaught TypeError: Cannot read property 'r' of null
          at new Color (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:281:22)
          at Color (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:255:20)
          at Object.helpers.color (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:10131:24)
          at helpers.getHoverColor (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:10138:25)
          at ChartElement.setHoverStyle (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:9304:137)
          at Chart.updateHoverStyle (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:8937:86)
          at Chart.handleEvent (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:9020:24)
          at Chart.eventHandler (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:8957:34)
          at listener (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:8894:37)
          at HTMLCanvasElement.proxies.(anonymous function) (http://simey.per.in.moodle.com/stable_master/lib/requirejs.php/-1/core/chartjs-lazy.js:15266:17)
      

      To reproduce, go to http://YOURMOODLESITE/stable_master/lib/tests/other/chartjstestpage.php with the console open and hover over the pie or donut chart, you'll notice the tool tip is not displayed and the error above is displayed on the console.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lameze Simey Lameze
                Reporter:
                lameze Simey Lameze
                Peer reviewer:
                Jun Pataleta
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  19/Mar/18