michael-milette / moodle-filter_filtercodes

FilterCodes filter for Moodle enables content creators to easily customize and personalize course and site content using plain text tags (no HTML). For premium support, contact us at https://www.tngconsulting.ca/contact
https://moodle.org/plugins/filter_filtercodes
GNU General Public License v3.0
30 stars 42 forks source link

Feature Request: Progress Pie #255

Closed michael-milette closed 1 year ago

michael-milette commented 1 year ago

Prerequisites

Feature Request - The User Story

I would like to be able to display a circular/doughnut graph that displays a given percentage.

Screenshots / Mock-ups

image

Alterative you have considered

{chart radial} tag.

Additional information

No response

Planning on submitting a solution in a pull request (PR)?

Yes

Code of Conduct

michael-milette commented 1 year ago

Done. This feature is included in FilterCodes 2.3.7 and later. Here are some examples of what you can do with it:

{chart progresspie 80 --title:This is the caption}

image

{chart progresspie 10--color:red}

image

{chart progresspie 20}

image

{chart progresspie 40 --color:darkblue --size:80px --border:5px}

image

{chart progresspie 60 --color:purple --border:15px --bgcolor:yellow}

image

{chart progresspie 80 --color:orange --bgcolor:red}

image

{chart progresspie 90 --color:green --bgcolor:transparent}

image

{chart progresspie {coursegradepercent} --size:100px --border:15px --color:darkblue --bgcolor:lightblue --title:Are you over 70% yet?}

image

You can either use color names (see https://htmlcolorcodes.com/color-names/) or RGB values like #FF0000 instead of red.