Open audrism opened 3 years ago
From the buildGraph.js file in server/route/api the colors for each item is defined as:
return Promise.all(promiseAll).then(() => { const typeMap = { "commit": "#ff0000", "file": "#00ff00", "author": "#0000ff", "project": "#ffff00", };
Which is commit = red, file = green, author = blue, and project = yellow
Presumably the labels need to be added to buildGraph.js as well
Actully in: client/app/components/FastGraph/FastGraph.js
by adding
nodes .append("text") .attr("x", 5) .attr("y", "0.31em") .attr("font-size", '7px') .attr("font-weight", 50) .attr("stroke", "black") .text((node) => node.id);
I think Brandon intended for the labels to appear when you click on the node because he has an onClick event for the graph. The labels you just added look pretty good to me though
I think Brandon intended for the labels to appear when you click on the node because he has an onClick event for the graph. The labels you just added look pretty good to me though
Nevermind, I see now that it creates a new graph off of the node that you click on.
Clarification: 1) what node colors mean green (file?), black, red (project?), yellow, and blue 2) where in the codebase to add labels?