Skip to content

Commit

Permalink
[chores] Improvements
Browse files Browse the repository at this point in the history
Basic example:

- thicker link lines
- smaller node size
- lighter node color

Basic and Map:

Legends > Legend.
  • Loading branch information
nemesifier committed Jul 21, 2022
1 parent 9e9756c commit 7c3fb74
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/netjsongraph.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/netjsongraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
});
},
});
const createLegends = (key, name) => {
const createLegend = (key, name) => {
const legendItem = document.createElement("p");
const legendIcon = document.createElement("span");

Expand All @@ -99,10 +99,10 @@
const legends = document.createElement("div");
const legendsHeader = document.createElement("h4");
legends.setAttribute("id", "legend");
legendsHeader.innerHTML = "Legends";
legendsHeader.innerHTML = "Legend";
legends.appendChild(legendsHeader);
legends.appendChild(createLegends("Up", "link-up"));
legends.appendChild(createLegends("Down", "link-down"));
legends.appendChild(createLegend("Up", "link-up"));
legends.appendChild(createLegend("Down", "link-down"));

document.body.appendChild(legends);

Expand Down
8 changes: 4 additions & 4 deletions examples/netjsonmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
},
});

const createLegends = (key, name) => {
const createLegend = (key, name) => {
const legendItem = document.createElement("p");
const legendIcon = document.createElement("span");

Expand All @@ -123,10 +123,10 @@
const legends = document.createElement("div");
const legendsHeader = document.createElement("h4");
legends.setAttribute("id", "legend");
legendsHeader.innerHTML = "Legends";
legendsHeader.innerHTML = "Legend";
legends.appendChild(legendsHeader);
legends.appendChild(createLegends("Up", "link-up"));
legends.appendChild(createLegends("Down", "link-down"));
legends.appendChild(createLegend("Up", "link-up"));
legends.appendChild(createLegend("Down", "link-down"));

document.body.appendChild(legends);

Expand Down
8 changes: 4 additions & 4 deletions src/js/netjsongraph.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ const NetJSONGraphDefaultConfig = {
},
},
nodeStyle: {
color: "#f4d38c",
color: "#ffebc4",
},
linkStyle: {
width: 5,
width: 6,
color: "#1ba619",
},
nodeSize: "17",
nodeSize: "15",
},
baseOptions: {
backgroundColor: "#2B2B2B",
backgroundColor: "#282222",
},
},

Expand Down

0 comments on commit 7c3fb74

Please sign in to comment.