How to customize interactive tooltip?
See original GitHub issueI would like to change the content of the interactive tooltip.
I hadn’t success by setting chart option object with following:
...
useInteractiveGuideline: true,
interactiveLayer: {
tooltip: {
gravity: 's',
fixedTop: 65,
contentGenerator: function() {return function(d) {
d.conseil = conseilLabel[quelConseil(d.series[0].value,d.series[1].value)];
return '<p>'+p.tooltipContent(d)+'</p>';
}}(),
},
}
Then, I have tried by overriding chart.interactiveLayer.tooltip.contentGenerator once the chart is created. This works fine until any chart option is changed, then default content generator comes back.
What’s the best option to achieve my goal?
TIA
Issue Analytics
- State:
- Created 9 years ago
- Comments:5
Top Results From Across the Web
Tooltips: How to Create and Use Them Like a Pro - UserGuiding
During the tooltip design process, your product team should: Mind the tooltip content,. Use interactive elements when necessary,.
Read more >Create an interactive custom tooltip for chartjs - Stack Overflow
I'm using chartjs 2.8 and I've created some custom html tooltip for it, now i need to make that tooltip interactive ( aka...
Read more >Tooltips | Charts - Google Developers
Customizing tooltip content ... In this example, we add custom content to the tooltips by adding a new column to the DataTable and...
Read more >How To Create Tooltips - W3Schools
Tip: Go to our CSS Tooltip Tutorial to learn more about tooltips. Tip: To create "clickable" tooltips, go to our How To Create...
Read more >How to create interactive tooltips in Power BI (step by step)
How to create interactive tooltips in Power BI (step by step) · Step 1: Create the main visual · Step 2: Add a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ilariuss You can create a graph with an object instead of a function. The object has the properties
generate
(which would be your regular function that you pass into addGraph) and then thecallback
like above.See this for an example: https://github.com/novus/nvd3/blob/dbcdc25bd1637cbe5368a8e0f74032c1acafcb0f/examples/historicalBar.html#L30
tooltip.fixedTop(65); is not working in latest version of nvd3. any work around for this issue?
I want 2 tooltip for focus chart. one for start anchor point and another at end anchor point when someone use brush in linewithfocus chart. any idea how to achieve with nvd3? can I create 2 tooltip with nvd3 for focus chart and set their position?