[Question] How Can i make my custom tooltip template in bar chart ?
See original GitHub issue♻️ env
- React (latest)
- TypeScript (latest)
- Chrome (latest)
- OS : Mojave 10.14.5
Description
I want to make my custom tooltip in bar-chart. With reference to options.d.ts and documentation, I wrote the following:
// in bb.generate({}), in useEffect(React Hooks)
data: {
columns: [['data3', 130, -150, 200, 300, -200, 100]],
type: 'bar',
colors: {
data3: '#E1E1E1',
},
},
tooltip: {
grouped: false,
contents(
data: any,
defaultTitleFormat: string,
defaultValueFormat: string,
color: any
) {
return {
bindto: '#tooltip',
template:
'<ul><li>Index<br>{=TITLE}</li>{{<li class={=CLASS_TOOLTIP_NAME}><span>{=VALUE}:{=VAR}</span><br><span style=color:{=COLOR}>{=NAME}</span></li>}}</ul>',
};
},
},
<>
<div id="bar-chart"></div>
<div id="tooltip"></div>
</>
I expect sample Result. But My Result… is…
How Can I solve It?
Steps to check or reproduce
Generate billboard chart in useEffect.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Customize different tooltips of bar chart
I know it can use tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %> Files" to custmize the tooltips. But is it possible to show ...
Read more >How to Display Different Text For Each Bar in the Tooltip in ...
How to Make Gantt Timeline Chart in Chart JS · How to create a custom HTML tooltip from scratch in Chart JS ·...
Read more >How to Create Custom Shape Tooltip in Chart JS - YouTube
How to Create Custom Shape Tooltip in Chart JSIn this video we will explore how to create custom shape tooltip in chart js....
Read more >How to Add More Information in the Tooltips in Chart JS
How to Add More Information in the Tooltips in Chart JSIn this video we will explore how to add more information in the...
Read more >Customizable Tooltips on Excel Charts
How to create customizable, meaningful tooltips on XY Scatter Charts in Microsoft Excel.
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
@SoYoung210, this was caused by the incorrect definition. I’ll fix that and thanks for noticing me that. 😃 Sometimes definition can be erroneous(like this time), so always try consulting from API docs.
🎉 This issue has been resolved in version 1.10.0 🎉
The release is available on:
Your semantic-release bot 📦🚀