plotly / plotly/react-plotly.js

Cannot change hover text by hovertemplate/hoverinfo/text/hovertemplate

Open
#157 2 comments 0 reactions 0 assignees View on GitHub

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
                      },
                    }
                  },
                }}
/>

Screenshot 2019-09-03 at 00 49 29

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.