Repeat date in Graph tooltip.

This commit is contained in:
Danny van Kooten 2016-12-24 10:27:29 +02:00
parent 42e3f2134b
commit 524bc4f6bd
2 changed files with 6 additions and 2 deletions

View File

@ -22,12 +22,12 @@ function Chart(element, showPrimary, showSecondary) {
var pageviewTip = d3.tip()
.attr('class', 'd3-tip')
.html((d) => '<span>' + numbers.formatWithComma(d.Value) + '</span>' + ' pageviews')
.html((d) => '<h5>'+ d.Label +'</h5><span>' + numbers.formatWithComma(d.Value) + '</span>' + ' pageviews')
.offset([-12, 0]);
var visitorTip = d3.tip()
.attr('class', 'd3-tip')
.html((d) => '<span>' + numbers.formatWithComma(d.Value) + '</span>' + ' visitors' )
.html((d) => '<h5>'+ d.Label +'</h5><span>' + numbers.formatWithComma(d.Value) + '</span>' + ' visitors' )
.offset([-12, 0]);
var graph = d3.select('#graph');

View File

@ -46,6 +46,10 @@ rect:hover {
pointer-events: none;
}
.d3-tip h5 {
color: #CCC;
}
.d3-tip span {
color: lightgreen;
}