Skip to content

Commit

Permalink
feat(visual): make support for multiple tags for one commit
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 9, 2021
1 parent 67c7e57 commit 1a83d6d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/public/js/graph/git/tags-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function renderTagsTimeline(data) {

let mousemove = function (event, d) {
tooltip
.html("tag: " + d.name + "<br/> time: " + standardFormatDate(d.date))
.html("tag: " + d.name + "<br/>time: " + standardFormatDate(d.date) + "<br/> id: " + d.commit_id)
.style("left", event.pageX + 20 + "px")
.style("top", event.pageY + "px")
}
Expand All @@ -124,6 +124,10 @@ function renderTagsTimeline(data) {
g.selectAll("#tooltip_path").remove();
}

let color = d3.scaleLinear()
.domain([0, 2])
.range(["#00F", "#F00"]);

g.selectAll("dot")
.data(selectData)
.enter()
Expand All @@ -136,7 +140,9 @@ function renderTagsTimeline(data) {
return y(d.date);
})
.attr("r", 3)
.style("fill", "#69b3a2")
.style("fill", function (d) {
return color(d.share_index);
})
.on("mouseover", mouseover)
.on("mousemove", mousemove)
.on("mouseleave", mouseleave)
Expand Down

0 comments on commit 1a83d6d

Please sign in to comment.