Skip to content

textposition: auto not used for log axis #3767

Closed
@drkane

Description

@drkane

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):
image

But for a log axis the text is not adjusted:
image

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'
  }
});

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions