Chartist labels are getting cropped.
See original GitHub issueHere’s an example from my site:
This also happens on chartists documentation site (http://gionkunz.github.io/chartist-js/getting-started.html):
Is this expected behavior? The only way I can fix it is by manually adjusting the <foreignobject>
but then the label overlays the graph, or set overflow: visible
on <svg>
.
Issue Analytics
- State:
- Created 9 years ago
- Comments:7
Top Results From Across the Web
Space for long labels in Chartist - Stack Overflow
The idea with chartist, is that there is a separation of presentation and data, so all the chart elements are accessible through Css....
Read more >Axis labels get cropped / trimmed · Issue #715 · chartjs/Chart.js
Hi,. The labels on the X-axis get cropped when they are "too long": cropped_lables. I can provide a code example if necessary. I...
Read more >Chartist - Getting started - GitHub Pages
The easiest way to get started with Chartist.js is by using bower: ... var data = { // A labels array that can...
Read more >gionkunz/chartist-js - Gitter
I am trying to set the x-axis labels which is a list of of the last 7 dates. The issue I am encountering...
Read more >Chartist.js Options - CodePen
Position where labels are placed. Can be set to `start` or `end` where `start` is equivalent to left or top on vertical axis...
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
Hey there. As the multiline labels are done with
foreignObject
s in SVG there is no way how we could assume a required width. For this purpose we switched to a configurable offset of the chart per axis. In the configuration just use theoffset
configuration if you need to expand the space used for the labels:Check this example: http://jsbin.com/fesavu/1/edit?html,css,js,output
This is what worked for me.