We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
plotly
Learn more about funding links in repositories.
Report abuse
textposition: auto
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
I've found an issue with textposition: auto when creating a horizontal bar chart.
When a linear axis is used, the text is correctly adjusted to fit into the available bar (see the first "monkeys" bar):
But for a log axis the text is not adjusted:
JSFiddle example
var data = [ { y: ['giraffes', 'orangutans', 'monkeys'], text: ['giraffes', 'orangutans', 'monkeys'], x: [20, 14, 1], type: 'bar', orientation: 'h', textposition: 'auto', } ]; Plotly.newPlot('myDiv', data); Plotly.newPlot('myDivLog', data, { xaxis: { type: 'log' } });
The text was updated successfully, but these errors were encountered:
Thanks for the report!
This issue appears similar to #3373
Looks like #3762 fixed the behavior (on master, not released yet) for vertical bars:
var data = [ { x: ['giraffes', 'orangutans', 'monkeys'], text: ['giraffes', 'orangutans', 'monkeys'], y: [20, 14, 1], type: 'bar', textposition: 'auto', } ]; Plotly.newPlot('graph', data, { yaxis: { type: 'log' } });
now renders as:
but something is still up for horizontal bars.
Sorry, something went wrong.
@etpinard - thanks for looking at this and fixing so quickly! 👍
etpinard
Successfully merging a pull request may close this issue.
I've found an issue with
textposition: auto
when creating a horizontal bar chart.When a linear axis is used, the text is correctly adjusted to fit into the available bar (see the first "monkeys" bar):

But for a log axis the text is not adjusted:

JSFiddle example
The text was updated successfully, but these errors were encountered: