I have an unwanted number (in red rectangle below) appearing in tooltips in Plot:
These are ‘native’ tooltips created with the title
attribute:
Plot.plot({
color: {
scheme: "blues",
reverse: true,
},
y: {
label: "↑ Population",
tickFormat: "s",
grid: true
},
marks: [
Plot.barY(
data_sortable,
Plot.groupX(
{ y: "sum" },
{ x: "state",
y: "population",
fill: "ageGroup",
sort: {x: 'y', reverse: true},
title: d =>
`Age group: ${d.ageGroup}
State: ${d.state}
Population: ${d.population}
`
}
)
)
]
})
I tried truncating the title using slice()
after the title content to no avail:
title: d =>
`Age group: ${d.ageGroup}
State: ${d.state}
Population: ${d.population}
`.slice(...)
Obviously the (1)
part is added afterwards, hence no effect of the slice()
.
The problem persists when using Mike Freeman’s tooltips.
I isolated the issue in the following notebook:
Anyone perhaps faced this issue and solved it? I’d very much appreciate any ideas. Thanks a lot in advance!