mirror of https://github.com/status-im/fathom.git
Repeat date in Graph tooltip.
This commit is contained in:
parent
42e3f2134b
commit
524bc4f6bd
|
@ -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');
|
||||
|
|
|
@ -46,6 +46,10 @@ rect:hover {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
.d3-tip h5 {
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
.d3-tip span {
|
||||
color: lightgreen;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue