plotly / plotly/react-plotly.js
Cannot change hover text by hovertemplate/hoverinfo/text/hovertemplate
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
I am trying to change the hover text. However, this is no effect no matter how I set the data prop: hovertemplate / hoverinfo / text / hovertemplate. None of them work.
Here is the code:
<Plot
data={[
{
name: 'Target',
type: 'scatter3d',
mode: 'markers+text',
x: this.state.xValues,
y: this.state.yValues,
z: this.state.zValues,
marker: {color: "rgb(207, 190, 23)"},
hoverinfo: "all",
text: this.state.selectedStudentId,
hovertext: this.state.selectedStudentId,
},
]}
layout={{
autosize: true,
scene: {
height: 640,
title: 'Nearest Neighbor',
xaxis: {
title: this.state.selectedXAxis,
},
yaxis: {
title: this.state.selectedYAxis,
},
zaxis: {
title: this.state.selectedZAxis,
},
aspectratio: {
x: 1,
y: 1,
z: 1
},
camera: {
center: {
x: 0,
y: 0,
z: 0
},
eye: {
x: -2,
y: -2,
z: 1.25
},
up: {
x: 0,
y: 0,
z: 1
},
}
},
}}
/>

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the shown React entry point and reproduce the scatter3d example with the listed hoverinfo, text, hovertext, and hovertemplate props. Check the resulting hover behavior against the reported screenshot; done means identifying why the requested hover text is not applied and confirming the expected behavior with a focused reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100