Skip to content

Commit ba63f6d

Browse files
committed
added tooltip css
1 parent 0defcc5 commit ba63f6d

File tree

1 file changed

+43
-9
lines changed

1 file changed

+43
-9
lines changed

src/app/styles/components/d3graph.css

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
@import url('https://fonts.googleapis.com/css?family=Raleway&display=swap');
2-
body {
3-
background-color: black;
4-
}
1+
/* @import url('https://fonts.googleapis.com/css?family=Raleway&display=swap'); */
2+
@import url("https://fonts.googleapis.com/css?family=Overpass+Mono&display=swap");
3+
body {
4+
background-color: black;
5+
}
56

67
/* this represents leaf nodes aka nodes with no children */
78
.node circle {
89
fill: #5249f7;
910
}
11+
12+
.node circle:hover {
13+
fill: #9cf4df;
14+
}
15+
1016
.node text {
1117
font-size: 15px;
12-
font-family: 'Raleway', sans-serif;
18+
font-family: "Overpass Mono", monospace;
1319
}
1420
/* this represents text for leaf nodes aka the ones with no children */
15-
.node--leaf{
21+
.node--leaf {
1622
fill: #71e9e1;
1723
}
1824

@@ -24,12 +30,40 @@
2430
.node--internal text {
2531
fill: #fae6e4;
2632
font-size: 19px;
27-
2833
}
2934
.link {
3035
fill: none;
31-
stroke: #3853ea ;
36+
stroke: #3853ea;
3237
stroke-opacity: 0.4;
3338
stroke-width: 3px;
3439
}
35-
40+
41+
.d3-tip {
42+
line-height: 1;
43+
padding: 6px;
44+
background: #9cf4df;
45+
color: #320a5c;
46+
border-radius: 4px;
47+
font-size: 15px;
48+
font-family: "Overpass Mono", monospace;
49+
}
50+
51+
/* Creates a small triangle extender for the tooltip */
52+
.d3-tip:after {
53+
box-sizing: border-box;
54+
display: inline;
55+
font-size: 15px;
56+
width: 100%;
57+
line-height: 1;
58+
color: #9cf4df;
59+
content: "\25BC";
60+
position: absolute;
61+
text-align: center;
62+
}
63+
64+
/* Style northward tooltips specifically */
65+
.d3-tip.n:after {
66+
margin: -2px 0 0 0;
67+
top: 100%;
68+
left: 0;
69+
}

0 commit comments

Comments
 (0)