Spaces:
Sleeping
Sleeping
Update app.py
#21
by
singhn9
- opened
app.py
CHANGED
|
@@ -245,17 +245,15 @@ function draw() {
|
|
| 245 |
.style("cursor","pointer");
|
| 246 |
|
| 247 |
group.append("text")
|
| 248 |
-
.attr("x",d=>Math.cos(d.angle)*(radius+
|
| 249 |
-
.attr("y",d=>Math.sin(d.angle)*(radius+
|
| 250 |
-
.attr("dy","0.35em")
|
| 251 |
-
.style("font-family","sans-serif")
|
| 252 |
-
.style("font-size",Math.max(10,Math.min(
|
| 253 |
-
.style("text-anchor",
|
| 254 |
-
const deg=d.angle*180/Math.PI;
|
| 255 |
-
return (deg>-90 && deg<90)?"start":"end";
|
| 256 |
-
})
|
| 257 |
.style("cursor","pointer")
|
| 258 |
-
.text(d=>
|
|
|
|
| 259 |
|
| 260 |
function bezierPath(x0,y0,x1,y1,above=true){
|
| 261 |
const mx=(x0+x1)/2, my=(y0+y1)/2;
|
|
|
|
| 245 |
.style("cursor","pointer");
|
| 246 |
|
| 247 |
group.append("text")
|
| 248 |
+
.attr("x", d => Math.cos(d.angle) * (radius + 20))
|
| 249 |
+
.attr("y", d => Math.sin(d.angle) * (radius + 20))
|
| 250 |
+
.attr("dy", "0.35em")
|
| 251 |
+
.style("font-family", "sans-serif")
|
| 252 |
+
.style("font-size", Math.max(10, Math.min(13, radius*0.038)))
|
| 253 |
+
.style("text-anchor", "middle")
|
|
|
|
|
|
|
|
|
|
| 254 |
.style("cursor","pointer")
|
| 255 |
+
.text(d => d.name);
|
| 256 |
+
|
| 257 |
|
| 258 |
function bezierPath(x0,y0,x1,y1,above=true){
|
| 259 |
const mx=(x0+x1)/2, my=(y0+y1)/2;
|