Skip to content

Commit e434190

Browse files
authoredJul 15, 2024··
update legend
update legend
1 parent cef8eed commit e434190

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed
 

‎main.js

+25-4
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ function addPeriodGaussianPlot(timelines) {
559559
var coords = x(deltaLE);
560560
svg.append("line")
561561
.attr("x1", coords)
562-
.attr("y1", 200)
562+
.attr("y1", 100)
563563
.attr("x2", coords)
564564
.attr("y2", 450)
565565
.attr("stroke", timeline_colors[key])
@@ -578,10 +578,22 @@ function addPeriodGaussianPlot(timelines) {
578578
.attr("stroke-width", 2);
579579

580580
// add a text to show the gaussian score, also translate the label to top
581+
svg.append("circle")
582+
.attr("cx", 580)
583+
.attr("cy", 95 + counter*20)
584+
.attr("r", 5)
585+
.attr("stroke", "black")
586+
.attr("stroke-width", 2)
587+
.text((yval*10000).toFixed(2))
588+
// add color
589+
.attr("fill", timeline_colors[key]);
590+
581591
svg.append("text")
582-
.attr("x", coords + 5)
583-
.attr("y", ycoords - 20)
584-
.text((yval*10000).toFixed(2));
592+
.attr("x", 600)
593+
.attr("y", 100 + counter*20)
594+
.text((yval*10000).toFixed(2))
595+
// add color
596+
.attr("fill", timeline_colors[key]);
585597
}
586598

587599
counter++;
@@ -812,6 +824,15 @@ function addTimeGaussianPlot(timelines){
812824
.attr("stroke-width", 2);
813825

814826
// add a text to show the gaussian score, also translate the label to top
827+
svg.append("circle")
828+
.attr("cx", 580)
829+
.attr("cy", 15 + counter*20)
830+
.attr("r", 5)
831+
.attr("stroke", "black")
832+
.attr("stroke-width", 2)
833+
.text((yval*10000).toFixed(2))
834+
// add color
835+
.attr("fill", timeline_colors[key]);
815836
svg.append("text")
816837
.attr("x", 600)
817838
.attr("y", 20 + counter*20)

0 commit comments

Comments
 (0)
Please sign in to comment.