Skip to content
Discussion options

You must be logged in to vote

%%{init: {'themeVariables': {'pie1': '#FFD700', 'pie2': '#87CEEB', 'pie3': '#32CD32'}}}%%
pie
  title Car Colors
  "Yellow Car": 50
  "Blue Car": 30
  "Green Car": 5

Explanation:

  1. The %%{init: ...}%% block initializes the Mermaid configuration, allowing you to define custom colors for the pie chart slices.
  2. The pie1, pie2, and pie3 keys correspond to the slices in the order they are declared in the pie block.
    • #FFD700: Yellow (assigned to "Yellow Car").
    • #87CEEB: Light Blue (assigned to "Blue Car").
    • #32CD32: Green (assigned to "Green Car").

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@agss0
Comment options

Answer selected by lemorage

This comment was marked as off-topic.

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Question Ask and answer questions about GitHub features and usage
4 participants