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

ChartJS tooltip not working after 3.4 upgrade

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE
    • MDL-61218-master
    • 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.

      This bug has been reported by CrymSonir.

      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.

            lameze Simey Lameze
            lameze Simey Lameze
            Jun Pataleta Jun Pataleta
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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