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

Charts API: support for Area Chart fill values from Chart.js

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Browse to http://your-testing-site/lib/tests/other/chartjstestpage.php
      2. Verify that the last chart on the page has title "AREA FILL CHART".
      3. Verify that it contains three series: Hills, Mountain, Sky.
      4. Verify that "Hills" fills down to the bottom (origin) of the chart.
      5. Verify that "Sky" fills up to the top (end) of the chart.
      6. Verify that "Mountain" fills down to the Hills area below (-1).
      Show
      Browse to http://your-testing-site/ lib/tests/other/chartjstestpage.php Verify that the last chart on the page has title "AREA FILL CHART". Verify that it contains three series: Hills, Mountain, Sky. Verify that "Hills" fills down to the bottom ( origin ) of the chart. Verify that "Sky" fills up to the top ( end ) of the chart. Verify that "Mountain" fills down to the Hills area below ( -1 ).
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      master

      Description

      I have a patch adding support for Area Charts as per: https://www.chartjs.org/docs/2.7.0/charts/area.html

      This involves adding fields, getters and setters to the Series classes in both PHP and Javascript. From Moodle code, it's a matter of invoking e.g. $series->set_fill('-1').

      An example is provided in the patch to tests/other/chartjstestpage.php.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              drcuriosity David Thompson
              Reporter:
              drcuriosity David Thompson
              Peer reviewer:
              Dan Marsden
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m