New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline axis text #798
Comments
Hi @davidhund, have you ever tried axis.y.inner option? |
Hi @netil - Thank you for your quick reply. I did look at The SVG width is In the screenshot below, the bottom part is what I currently have. This looks OK (but I'd like the labels inline). If I set PS: I realize this setting should be used, but it is unusable because of this effect. |
@davidhund, can you give full generation option to reproduce? |
@netil - I've added a codepen: https://codepen.io/davidhund/pen/jJmLjJ The issue is with dynamically setting the If you look at the JS pane, line 29 I can set // ..
axis: {
y: {
inner: true // THIS WORKS
}
}
// .. However: I am using if(window.matchMedia(`(max-width: 55em)`).matches) {
// ...
chart.config(`axis.y.inner`, true); // THIS DOES NOT WORK
} Maybe that is because I found I needed to re-draw the Chart with // Config changes
// .. chart.config(xyz);
// RE-render (!?)
// https://github.com/naver/billboard.js/issues/500#issuecomment-406487456
chart.show(); |
@davidhund, I fixed axis inner style to be updated via |
Description
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:
.. 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'?
The text was updated successfully, but these errors were encountered: