Axis name padding does not account for axis labels
See original GitHub issueWhat problem does this feature solve?
Axis name padding is currently relative to the axis itself without accounting for other elements like axis labels, etc. Padding in the DOM is aware of all other elements and so ensures sufficient white space. This feature would consider all such elements and set the grid padding accordingly to automatically allow enough space for all elements that need to appear between the grid and the edge of the container – ensuring a predictable amount of whitespace around each element.
What does the proposed API look like?
It would remain the same as the current padding
option, but would not be relative to the axis, it would instead be relative to the closest neighboring element.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Axis name padding does not account for axis labels #10172
Axis name padding is currently relative to the axis itself without accounting for other elements like axis labels, etc. Padding in the DOM...
Read more >Matplotlib - Move X-Axis label downwards, but not X-Axis Ticks
Is there any way to move only the x-axis label to underneath the three rows of figures? Nb: You may need to open...
Read more >Axis title padding | CanvasJS Charts
I have a column chart with two Y axes. However, the space between the axis labels and the axis title is very small,...
Read more >Axis in WPF Charts (SfChart) - Syncfusion
Learn here all about Axis support in Syncfusion WPF Charts (SfChart) ... VisibleLabels – Represents the axis label collection which are visible in...
Read more >Axis | Vega-Lite
If set to "greedy" , a linear scan of the labels is performed, removing any labels that overlaps with the last visible label...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you mean the axisLabel.margin or nameGap or axisLabel.padding here ? Because I think there is no option named
padding
foraxis name
currently.For the options above:
axisLabel.margin is not a good name (by historical reason) and might bring misleading to users. It actually means the gap between the axis label and the axis line.
axisLabel.padding indeed only consider itself only without the neighboring elements. It is implemented the same as other labels follow the “rich text” module.
ECharts does not have an overall layout system as DOM did in Normal Flow, Floats, etc., which layout DOM elements by the margin/padding automatically without overlap. The layout strategies in echarts are case by case, meeting each chart/component requirements. That makes the code easy to implement but probably less customizable and intelligent.
Go back to this issue. I think what we can do is:
grid.containLabel
is great for dynamic axis labels, but as you already noted does not consider the axis name:I think implementing this would indeed solve the issue I was noticing.