-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
xaxis last label is trimmed #305
xaxis last label is trimmed #305
Comments
Thanks for reporting the issue. |
I reverted |
@junedchhipa Looks like this is still an issue with datetimes that include month. Saw in the docs that tickPlacement does not affect the datetime. Any tricks to get around it cutting that last label on the right? |
Re-opening this if datetime labels still have an issue with the last label. |
If you use a custom formatter function, the labels will still break out of the rendering area. |
Hello, the issue persists, but in my case on the first value. 'between' option works well for categorical variables but as the doc says not for numerical. |
I had the same problem for datalabels, Changing CSS for labels helped me to solve it |
Everyone please do the following. It should work
This should solve the problem. I am using |
Same problem here, the last date on the bottom corner in the right is cropped =( My options for {
xaxis: {
title: {
text: xaxisTitle,
style: {
fontSize: 20,
color: '#ffffff'
}
},
labels: {
formatter: value => {
return moment(new Date(value)).format('MM-YYYY')
},
style: {
fontSize: 20
}
},
tickAmount: 5,
tickPlacement: 'between'
}
} I'm using the |
Still having that issue with |
Guys, after studying this issue, it happened to me that when I converted the datetimes to milliseconds, somehow the program interpreted those datetimes in GMT timezone, and then converted it to my timezone (UTC -3). Consequently, I always got the date of the last day which led me to think that the last date was being cropped. My solution was to simply add up 3 hours (or 3*3.6e6 milliseconds) to my timestamps. |
This did the trick for me:
|
This issue should not be closed. I am seeing this bug on fresh installation of latest apex chart .apexcharts-xaxis-label:nth-last-child(2) {
transform: translateX(-20px)
} |
Had to add an entire day to each of my datetime x-axis entries just to get the last month to show up. January still doesn't show. moment.utc(item.date, 'Y-MM', true).add(1, 'day').valueOf(), Using a |
Those who are still facing the issue, please post a Codepen/Codesandbox demo to reproduce. |
I think I am facing the same issue. Actually one of the demo charts displays this issue (I am using latest Firefox in case it is browser related): If you look on the thicks on x-axis, there is thick missing at the end of the chart (bottom-right) corner. In the SVG there is even |
This issue persists. The last date on the x-axis is cut: Tried @kakarukeys workaround above, and it works sometimes, but unfortunately not always, because sometimes the trimmed label is indeed the 2nd-to-last Any plans to fix this? |
Still an issue, see @alon-loris post above. This is happening with every type of label (the last one on the X axis), not just Date/Time format |
Codepen
Showcase codepen
Explanation
The showcase codepen uses the current versions of Vue-ApexCharts and ApexCharts.js, the expected behavior uses v1.1.0
Correct result codepen
The x axis sets the first and last point to be at the edge of the grid in the current version of Vue-ApexCharts, whereas the version showcased in the demos (that's where I picked the initial code) correctly sets the labels and the datapoints to have enough offset on both sides so that no clipping occurs.
Edge points and labels are clipped.
None.
Edit: Let me know if I should submit this to the Vue-ApexCharts repo instead.
Edit2: after fiddling with codepen, I can say this is an apexcharts issue, not the Vue component. This codepen uses apexcharts v3.1.0 and displays fine. It breaks starting with 3.2.0.
Edit3: I found that a property was added in 3.2.0 (xaxis.tickPlacement), which defaults to 'on', whereas the old behavior for a line chart was to have it as 'between'. The documentation isn't reflecting this, nor does it mention the existence of xaxis.tickPlacement. May I suggest that:
The text was updated successfully, but these errors were encountered: