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

Allow chart colours to be customised site-wide.

XMLWordPrintable

    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-57194-master
    • Hide
      1. Visit Chart.js test page: http://YOURHOSTNAMEHERE/stable_master/lib/tests/other/chartjstestpage.php.
      2. Make sure charts are displayed correctly and the colours are the same with/without the patch.
      3. Open you config.php and add the following line:

        $CFG->chart_colorset = ['#001f3f', '#01FF70', '#F012BE', '#85144b', '#7FDBFF', '#c29980', '#755d0d', '#009956', '#B10DC9', '#004565'];

      4. VIsit Chart.js test page again, make sure the colours defined on config are applied to ALL charts.
      Show
      Visit Chart.js test page: http://YOURHOSTNAMEHERE/stable_master/lib/tests/other/chartjstestpage.php . Make sure charts are displayed correctly and the colours are the same with/without the patch. Open you config.php and add the following line: $CFG->chart_colorset = ['#001f3f', '#01FF70', '#F012BE', '#85144b', '#7FDBFF', '#c29980', '#755d0d', '#009956', '#B10DC9', '#004565']; VIsit Chart.js test page again, make sure the colours defined on config are applied to ALL charts.

      Following on from MDL-55037 to define some default graph colours, which I totally agree with, it would be good if there was a way for an admin to change those default colours somehow, perhaps to work better with a theme.

      For now the minimum might be to just allow a CFG array variable to be inserted in config.php, which if defined, would override the default colour list.

      So at least it's possible in 3.2. UI not necessary.

      On the other hand perhaps there is a better way already in which case please let me know.

            lameze Simey Lameze
            dougiamas Martin Dougiamas
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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