enable positioning of horizontal legend below xaxis label
Open
Nobody has claimed this yet.
feature
P3
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
I want to put a (long) legend horizontally and below the xaxis.
But I have some trouble with positioning.
- By default, the legend runs into the axis label (see Fig. below).
- Putting the legend below the xaxis seems to require some guessing for a negative
y(or are the better ways?
Plotly.newPlot('graph', [
{ y: [2, 1, 3]},
{ y: [4, 2, 5]},
{ y: [3, 3, 6]},
],
{xaxis: {title: {text: 'axis label'}},
legend: {title: {text: 'legend title'},
orientation: 'h'}
}
)
Contributor guide
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
Start with the supplied JSFiddle and reproduce the horizontal legend below the x-axis label using the Plotly.newPlot configuration in the issue. Trace how legend and axis-label layout are positioned, then verify that long horizontal legends can be placed below the x-axis without overlap or manual negative-y guessing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100