mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
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()
|
var pageviewTip = d3.tip()
|
||||||
.attr('class', '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]);
|
.offset([-12, 0]);
|
||||||
|
|
||||||
var visitorTip = d3.tip()
|
var visitorTip = d3.tip()
|
||||||
.attr('class', '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]);
|
.offset([-12, 0]);
|
||||||
|
|
||||||
var graph = d3.select('#graph');
|
var graph = d3.select('#graph');
|
||||||
|
@ -46,6 +46,10 @@ rect:hover {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.d3-tip h5 {
|
||||||
|
color: #CCC;
|
||||||
|
}
|
||||||
|
|
||||||
.d3-tip span {
|
.d3-tip span {
|
||||||
color: lightgreen;
|
color: lightgreen;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user