Skip to content

Commit

Permalink
Merge pull request #1668 from NuGet/add-dots-to-line-graph
Browse files Browse the repository at this point in the history
initial commit
  • Loading branch information
johnataylor committed Oct 22, 2013
2 parents a3ea95f + deaa7b5 commit a58ac80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/NuGetGallery/Content/Site.css
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,14 @@ ul.pager li.next { padding-left: 10px; }
stroke-width: 1.5px;
}

.line-graph-dot {
fill: steelblue;
}

.line-graph-dot:hover {
fill: orange;
}

/* NuGet Badge */

.nuget-badge code {
Expand Down
13 changes: 13 additions & 0 deletions src/NuGetGallery/Scripts/statsgraphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,18 @@ var drawMonthlyDownloadsLineChart = function () {
.datum(data)
.attr("class", "line")
.attr("d", line);

var formatDownloads = d3.format(',');

svg.selectAll('.point')
.data(data)
.enter()
.append("svg:circle")
.attr("class", "line-graph-dot")
.attr("cx", function (d) { return xScale(d.month); })
.attr("cy", function (d) { return yScale(d.downloads); })
.attr("r", 5)
.append("title")
.text(function (d) { return formatDownloads(d.downloads); });
}

0 comments on commit a58ac80

Please sign in to comment.