c3js / c3js/c3

Donut tooltip title d is undefined

Open
#2,380 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

Hello
For line charts, modifying the tooltip title is done as
tooltip: {
format: {
title: function (x) { return 'Data ' + x; }
}
}

I have tried that with the donut chart and I get x is undefined (https://codepen.io/prtome/pen/LmKPpy)

What is the best way to modify the title depending on x for a donut chart ?
I am able to do that using contents - but it seems and overkill just for the title . Is that the only way ?
Thanks

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodePen and compare the donut tooltip title behavior with the line-chart example in the issue. Trace how the donut chart supplies the title callback argument, then confirm whether the requested title customization works or whether the supported alternative needs documenting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.