Closed LuigiMdg closed 5 years ago
Hello! Thanks for reporting this. Can you please provide a JSFiddle that reproduces the problem?
Here's a demo of the problem: https://donagest.com/test/
Thanks for the test. You're right—it looks like a problem in the header rendering logic for the "days" scale.
For some reason unclear to me, there's an extra day prepended to the header's range, which causes this issue on specific dates in the beginning of each month. I think it was added to compensate for another workaround introduced 5 years ago. Maybe @kripper or @taitems can comment?
In any case, I just put up a potentially cleaner, moderately-tested fix for this along with some long-standing DST-related issues (#95, #41) on my personal branch. Please take a look and test to see if it works for you, and I'll make a PR & eventually merge it to the official source.
No.. The problem isn't a extra day.. The problem is February that have width = 0px.. If you can delete the print of the months with 0 pixels they work correctly
I'll clarify what I mean—there's some strange logic that compares the chart's range with the "day before" its actual start. These comparisons to a seemingly irrelevant day can cause an extra month or year header cell to appear, even if no day in the range is part of the month/year.
@LuigiMdg, can you please test if my fix—which removes this extra month—works for you by using this file? Thanks in advance!
Today it work without use your file..! :( I wait next time error to try your updated file..
The problem has finally arisen ..! I made a video of how I would solve it .. Simply, when the width is equal to zero, you should avoid giving the output .. Alternatively, a display could be set to none Click for Video
Hello again! :)
As I mentioned in my previous two comments, I've already made a potential fix for this issue.
Can you please test it by temporarily loading this file in your page instead of the official one from this repository, and then tell me if it works for you?
Alternatively, you can play around with this JSFiddle, which demonstrates the fix: https://jsfiddle.net/xpvt214o/46353/
Please let me know if there are any unwanted side effects of my fix, and I'll update it. Otherwise, if it works, I'll make a pull request and get it merged into the official plug-in right away.
Thanks again for reporting this!
I could not explain why copying the code generated on the test page could not reproduce the problem .. I know so much that it was your fix that adjusted everything ..! Now it is gone, but as soon as it appears again I try to load it and I can confirm if the problem is solved :+1:
I finally put my fix into a pull request: #226.
Please feel free to review it and test it out!
This issue will be closed once it's merged.
Hi.. Today I've this problem..! (May is on new line) Link to Image This using original js and css