Open thany opened 7 years ago
In fact none of the options under tooltip
do anything at all, even in the examples. All of them.
I'm no expert on nvd3 or anything, but, maybe this is freaking important? Some folks might not want a tooltip at all, and right now it's impossible to even disable it.
Turns out if you have useInteractiveGuideline
set to true then the you must set your headerFormatter inside the interactiveLayer tooltip.
interactiveLayer: {
tooltip: {
headerFormatter(d) {
return d3.time.format('%b %-d, %Y %I:%M%p')(new Date(d));
}
}
}
It shouldn't be so complicated. Without this weirdness, it's complicated enough as it is.
I say this is a bug.
I've got a graph with tooltips, and I want to format a tooltip header differently than what's on the X-axis. This is not possible, because
tooltip.headerFormatter
is being ingored. It always usesxAxis.tickFormat
.Example config:
The
headerFormatter
function isn't even called. Not once. Incidentally,keyFormatter
isn't called either. Not once.valueFormatter
has the same problem (not included above). Is there a problem withtooltip
config alltogether? What's going on?It also doesn't work when trying out the same functions in one of the examples.
Versions: AngularJS 1.6.2 Angular-NVD3 1.0.9 NVD3 1.8.5 D3 3.5.17