Skip to content

Be able to set the opacity for the annotation of an edge #5174

Open
@peter-csala

Description

Description

In case of Graph diagrams whenever I set the opacity to 0 of an edge then the related annotation's background is still visible

Steps to reproduce

  1. Create a graph diagram
  2. Define at least two nodes
  3. Define at least one edge
  4. Set the opacity and the color to 0 for the edge via the linkStyle

Screenshots

Screenshot 2023-12-20 at 11 13 36

Code Sample

graph TD
    start[Start]
    middle[Process]
    stop[Stop]

    start -- calls --> middle
    middle -- notifies --> stop

    %% Step 1 - hide everything except the start
    %% Step 2 - comment out related assets
    %% Step 3 - comment out related assets

    %% Frame 2's assets
    linkStyle 0 opacity:0,color:#0000
    style middle opacity:0,color:#0000

    %% Frame 3's assets
    linkStyle 1 opacity:0,color:#0000
    style stop opacity:0,color:#0000

Related Live Editor link

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

To be able to hide the edge's annotation by setting 0 to one of the opacity properties.

Additional Context

Here you can find my StackOverflow question

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions