Inline axis text
See original GitHub issueDescription
For a line-chart I’d like to be able to set Y-axis tick text inline on narrow screens: The tick text would show inside the line-chart as described in this article: “Inset y-axis labels on small viewports”
On narrow screens this would free up some horizontal space in the left margin of the chart. I cannot find any config setting for this.
I could set something like:
chart.config( `axis.y.tick.text.position.x`, 20); // 20 is arbitrary :(
… but the value (20
) depends on the width of the value, and this could be anything…
Q: Is there a way to set the Y-axis text ‘inline’?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Grid Axis - MDN Web Docs Glossary: Definitions of ... - Mozilla
The inline or row axis runs across the Block Axis and is the direction along which regular text flows. These are our rows...
Read more >d3.js - inline style stroke-width for axis makes bold tick labels
I am expecting {'stroke-width': '3px'} to make thick axis lines. But it makes bold axis labels. I expected the text to be controlled...
Read more >Change axis labels in a chart - Microsoft Support
Change the text and format of category axis labels and the number format of value axis labels in your chart (graph).
Read more >CSS Inline Layout Module Level 3 - W3C
A baseline is a line along the inline axis of a line box along which individual glyphs of text are aligned. Baselines guide...
Read more >Y - Axis labels in Line Chart - Microsoft Power BI Community
Y - Axis labels in Line Chart. 01-25-2019 09:22 AM. Help me please,. We use this kind of chart a lot where I...
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
@davidhund, I fixed axis inner style to be updated via
.config()
(checkout the screenshot from #802)@netil - I’ve added a codepen: https://codepen.io/davidhund/pen/jJmLjJ
The issue is with dynamically setting the
inner
withchart.config
If you look at the JS pane, line 29 I can set
inner
totrue
directly and it worksHowever: I am using
chart.config
after initializing the Chart (see line 68):Maybe that is because I found I needed to re-draw the Chart with
chart.show()
after creation to have the config changes be picked up. See lines 73 - 75