Doesn't Support Specifying Pie Chart Colors

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php

Research direction

No source files or tests are named in the report. Start by tracing how the extension passes Mermaid configuration for pie charts, compare it with the provided Mermaid playground example, and verify that themeVariables such as pie1 through pie4 can override the base theme when the chart is rendered.

Written by the indexing model from the issue text.

Description

When trying to specify colors for a slice on a pie chart, the config options don't work with this plugin. However, if I can create the chart how I want it in the Mermaid playground/live editor.

For example, this is a valid custom pie chart in Mermaid:

---
config:
    theme: "base"
    themeVariables:
        pie1: "#bf24b9"
        pie2: "#ff0000"
        pie3: "#00ff00"
        pie4: "#0000ff"
---
pie
    "Graphics" : 40
    "Sound" : 30
    "Technology" : 20
    "Gameplay": 10

Instead when I use this extension, the colors of the base theme cannot be overridden. I am not sure if this is a bug or a design decision, but I was hoping to use this plugin instead of having to utilize pictures of the charts. Being able to modify the colors is important for using the pie charts with the same categories with different parameters.

Software Version
MediaWiki 1.43.6 (LTS)
PHP 8.3.6
Web Server Apache
Database PostgreSQL 18.1
Dominant language
PHP
Stars
48
Forks
26
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SemanticMediaWiki/Mermaid

All issues in SemanticMediaWiki/Mermaid

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.