Graphviz: How to change border color

19,749

Solution 1

I found a solution that works in my case.

"test" [
    style="filled,dashed"
    shape=box
    color=black
    fillcolor=lightgray
    label="Hello World"
];

It was misleading because if fillcolor is not specified, it appears it will default to color.

Solution 2

So You can actually get this with one less line:

"test" [
    style="filled,dashed"
    shape=box
    fillcolor=lightgray
    label="Hello World"
];

In my testing at least including a fillcolor with no color defaults to black border.

Share:
19,749

Related videos on Youtube

puk
Author by

puk

Updated on June 05, 2022

Comments

  • puk
    puk about 2 years

    Given a node like so, on a white background

    "test" [
        style="filled,dashed"
        shape=box
        color=lightgray
        label="Hello World"
    ];
    

    How do I make the dashed border black?

  • ryandesign
    ryandesign over 12 years
    Correct. As the documentation says, if fillcolor is not defined, color is used.
  • Mike Samuel
    Mike Samuel almost 4 years
    @ryandesign's link is dead. current
  • kuropan
    kuropan about 3 years
    Importantly, the order of the arguments matters here. Specifying color after fillcolor seems to overwrite the filling color (or at least that's the behavior when used with VisJS)