diff --git a/web/public/js/graph/git/tags-timeline.js b/web/public/js/graph/git/tags-timeline.js index cafb2969..e3647cc5 100644 --- a/web/public/js/graph/git/tags-timeline.js +++ b/web/public/js/graph/git/tags-timeline.js @@ -115,7 +115,7 @@ function renderTagsTimeline(data) { let mousemove = function (event, d) { tooltip - .html("tag: " + d.name + "
time: " + standardFormatDate(d.date)) + .html("tag: " + d.name + "
time: " + standardFormatDate(d.date) + "
id: " + d.commit_id) .style("left", event.pageX + 20 + "px") .style("top", event.pageY + "px") } @@ -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() @@ -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)