Skip to content

Hoverformat fails to apply when showticklabels=False #261

Closed
@yankev

Description

@yankev

This is in reference to the following issue in the Plotly Python API:
Issue 398

Unless showticklabels = True then the hoverformat is not applied.
For example in the following code:

from plotly.graph_objs import Scatter, Layout, YAxis, Figure
import plotly.plotly as py

data = [Scatter(x=[1, 2, 3],
                 y=[0.12345, 0.23456, 0.34567])]
layout = Layout(yaxis=YAxis(showticklabels=False,
                            hoverformat=",.2r",))
figure = Figure(data=data, layout=layout)
py.iplot(figure)

Plot generated from the code

The associated yaxis portion of the json is

yaxis:{
  hoverformat:",.2r",
  showticklabels:false,
  type:"linear",
  range:[
             -0.2711700793681046,
              0.7894967832778617
             ],
  autorange:false
}

and so it appears to have translated correctly from the python plot function call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions