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

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

    XMLWordPrintable

Details

    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • master
    • 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 ).

    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

              drcuriosity David Thompson
              drcuriosity David Thompson
              Dan Marsden Dan Marsden
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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