Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOT_NODE_ATTR ignore color #10831

Open
samrrr opened this issue Apr 27, 2024 · 2 comments
Open

DOT_NODE_ATTR ignore color #10831

samrrr opened this issue Apr 27, 2024 · 2 comments
Labels
needinfo reported bug is incomplete, please add additional info

Comments

@samrrr
Copy link

samrrr commented Apr 27, 2024

Describe the bug
DOT_NODE_ATTR ignore color
Way to change fill color fails.
DOT_NODE_ATTR = "color=red, fillcolor=gray20" ignored

Screenshots
image

To Reproduce
Set DOT_NODE_ATTR to
color=red, fillcolor=gray20
Generate and open graph png from Graphviz.

Expected behavior
Not white ellipses in generated png.

Version
1.10.0

Stack trace

Additional context

Generated .dot files contains color override from hardcoded colors like this:

t << " color=\"steelblue1\" fontcolor=\"steelblue1\"];\n";
fillcolor=\"white\",style=\"filled\"
@albert-github albert-github added the needinfo reported bug is incomplete, please add additional info label Apr 28, 2024
@albert-github
Copy link
Collaborator

From the screenshot, what does it represent?, it is not detectable what and where the problem might be. To be able to reproduce the issue:

  • Can you please attach a, small, self contained example (source+configuration file in a, compressed, tar or zip file!) that allows us to reproduce the problem? Please don't add external links as they might not be persistent (also references to GitHub repositories are considered non persistent).

@albert-github
Copy link
Collaborator

I did some small tests to represent a bit the image that is used in the issue:

aa,h

/// \file


class base
{
};
class variant: public base
{
};
class vector: public base
{
};

Doxyfile

QUIET = YES
HAVE_DOT = YES
DOT_CLEANUP = NO
DOT_NODE_ATTR = "color=\"red\", fillcolor=\"green\""
DOT_EDGE_ATTR = "color=\"blue\", fillcolor=\"yellow\""

Without the DOT_*_ATTR this gives:
image

and with the settings:
image

When looking at the respective *.dot files we see:

Without the settings (html_org/classbase__inherit__graph.dot):

digraph "base"
{
 // LATEX_PDF_SIZE
  bgcolor="transparent";
  edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10];
  node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4];
  Node1 [id="Node000001",label="base",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "];
  Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "];
  Node2 [id="Node000002",label="variant",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",URL="$classvariant.html",tooltip=" "];
  Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "];
  Node3 [id="Node000003",label="vector",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",URL="$classvector.html",tooltip=" "];
}

with the settings (html_adj/classbase__inherit__graph.dot):

digraph "base"
{
 // LATEX_PDF_SIZE
  bgcolor="transparent";
  edge [fontname=Helvetica,fontsize=10,color="blue", fillcolor="yellow"];
  node [fontname=Helvetica,fontsize=10,color="red", fillcolor="green"];
  Node1 [id="Node000001",label="base",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip=" "];
  Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "];
  Node2 [id="Node000002",label="variant",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",URL="$classvariant.html",tooltip=" "];
  Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "];
  Node3 [id="Node000003",label="vector",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled",URL="$classvector.html",tooltip=" "];
}

So the difference is:

5,6c5,6
<   edge [fontname=Helvetica,fontsize=10,labelfontname=Helvetica,labelfontsize=10];
<   node [fontname=Helvetica,fontsize=10,shape=box,height=0.2,width=0.4];
---
>   edge [fontname=Helvetica,fontsize=10,color="blue", fillcolor="yellow"];
>   node [fontname=Helvetica,fontsize=10,color="red", fillcolor="green"];

The description with DOT_COMMON_ATTR only speaks of things like fonts etc. but not about colors of edges / nodes and I think for good reason.
The colors of nodes and edges have different meanings depending on their tasks and visibility. When these settings would be overruled this extra information is lost.

Example: example.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo reported bug is incomplete, please add additional info
Projects
None yet
Development

No branches or pull requests

2 participants