Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
himgodfreyho opened this issue Sep 2, 2019 · 2 comments
Open

Comments

@himgodfreyho
Copy link

@himgodfreyho himgodfreyho commented Sep 2, 2019

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

@nicolaskruchten
Copy link
Member

@nicolaskruchten nicolaskruchten commented Oct 27, 2019

You have to unset hoverinfo and set hovertemplate instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.