plotly / plotly/react-plotly.js
Axis `automarging` does not work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
Hello,
I cannot get the Plotly.js automargin feature to work in React for axis ticks and labels.
Here is an example using official example:
// ...
var data = [
{
x: ['Apples', 'Oranges', 'Watermelon', 'Pears'],
y: [3, 2, 1, 4],
type: 'bar'
}
];
var layout = {
autosize: false,
width: 500,
height: 500,
yaxis: {
title: 'Y-axis Title',
ticktext: ['long label','Very long label','3','label'],
tickvals: [1, 2, 3, 4],
tickmode: 'array',
automargin: true,
titlefont: { size:20 },
},
};
return (
<div className="card-page">
<Plot data={data} layout={layout}></Plot>
</div>
What I get is this:
Am I missing a setting?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository file or test; begin by reproducing its inline JavaScript/React example with long y-axis tick labels and automargin enabled. Trace the resulting margin behavior and verify the result against the rendered example; done means the reported axis-label spacing issue is explained and corrected or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100