Skip to content

Tickmark precision with percentage formatting #3814

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

Closed
jonmmease opened this issue Apr 29, 2019 · 0 comments · Fixed by #5114
Closed

Tickmark precision with percentage formatting #3814

jonmmease opened this issue Apr 29, 2019 · 0 comments · Fixed by #5114
Assignees
Labels
bug something broken

Comments

@jonmmease
Copy link
Contributor

Originally reported in plotly/plotly.py#1537.

When the axis tickformat is set to 'p' for percentage, the ticks are often displayed with an unexpectedly large amount of precision.

CodePen: https://codepen.io/jonmmease/pen/vMMNXJ?editors=1010

var fig = {
  "data": [
    {
      "type": "scatter",
      "y": [
        0,
        1.0
      ]
    }
  ],
  "layout": {
    "yaxis": {
      "tickformat": "p",
      "automargin": true,
    }
  }
}


Plotly.newPlot('myDiv', fig, {showSendToCloud: true});

newplot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
3 participants