0

I am using Alchemy.js library and I need to change the node/edge caption color. Here is my config.

  var config = {

        dataSource: 'graphs.json',
        backgroundColor: "white",
        nodeCaptionsOnByDefault: true,
        edgeCaptionsOnByDefault: true,
        captionsToggle: true,

        "nodeTypes": {
            "role": ["Author",
                     "Paper"]
        },
        "edgeTypes": {
            "caption": ["Writes"]
        },
        "nodeStyle": {
            "Author": {
                color: "black",
                captionColor: "red",
                borderColor: "black"
            },
            "Paper": {
                color: "red",
                captionColor: "red",
                borderColor: "green"
            }
        },
        "edgeStyle": {
            "Writes": {
                color: "blue",
                captionColor: "black",
                opacity: 3,
                width: 5
            }
        }
    };
     alchemy.begin(config)

I am using captionColor:"black" but its not working any help.

Ramiz
  • 11
  • 4

1 Answers1

0

you can add in "alchemy.css" file:

.node.all text {
display: block;
font-size: 15px;
fill: black;
}

.edge.all text {
display: block;
font-size: 20px;
text-anchor: middle;
fill: black;
}
droid4fun
  • 29
  • 5