-
Notifications
You must be signed in to change notification settings - Fork 1.5k
showMajorLabels to false and scale set to 'week' creates vertical lines display bug #3246
Comments
Can you try with 4.20.1? If it still happens, can you create a jsbin or jsfiddle that shows the problem? |
Hi, thanks, for your interest in this problem, https://jsfiddle.net/e7uodse2/1269/ |
Nice to see that people are using the week scale feature! I only saw this issue now and I am not sure if there's a misunderstanding here. The additional vertical line at the month's start is a feature, not a bug. See my comment in #3009 (comment) . @yotamberk, do you remember this discussion? Additionally, this fix seems to break the weekStyling.html example: |
@marcortw egh... You're right... The bug in the example is problematic... |
Yes, I agree that the extra line looks funny in the case when the major labels are not used. As it looks like, this fix keeps the extra line when major labels are used, which seems to be a good approach. So if the label bug is fixed, then this seems to be fine. There's another issue visible in the above screenshot, which I was already aware of: If major labels are used, the following div overlaps the previous week number (here the cut off undefin.. string). This also happens for week numbers sometimes. Should I open another issue for that? Tbh, I wasn't that keen on fixing it initially because the whole TimeStep thing seems to be a bit too unflexible for these kind of things. |
The overlap is due to the div of the major being after the minor label and with a background (hence the overlay), Not much can be done with that. |
* weekly scale minor label fix * don't break lint guidelines * ignore linting
… weekly scale. (almende#3305) * fixes showMajorLabel issue in almende#3246 almende#3246 * fix at TimeStep level, for weekly mode, when showMajorLabels == false * pass options in TimeStep construction
* weekly scale minor label fix * don't break lint guidelines * ignore linting
… scale. (#3305) * fixes showMajorLabel issue in #3246 almende/vis#3246 * fix at TimeStep level, for weekly mode, when showMajorLabels == false * pass options in TimeStep construction
Hello and first, thanks for this really useful tool :),
I think i have identified a bug: when setting both options showMajorLabels to false and timeAxis to { scale: 'week', step: 1 }, there is a display bug for vertical lines where months were supposed to be. this seems to just be a display bug.
on version 4.20.0 of the Timeline
Here you can see that the div for week 22 appears two times
here is sample code to reproduce :
var container = document.getElementById('example-timeline');
// Create a DataSet with data
var data = new vis.DataSet([{
id: 1,
content: 'First event',
start: '2014-08-01'
}, {
id: 2,
content: 'Pi and Mash',
start: '2014-08-08'
}, {
id: 3,
content: 'Wikimania',
start: '2014-08-08',
end: '2014-08-10'
}, {
id: 4,
content: 'Something else',
start: '2014-08-20'
}, {
id: 5,
content: 'Summer bank holiday',
start: '2014-08-25'
}]);
// Configuration for the Timeline as JSON object
var options = {
showMajorLabels: false,
timeAxis: {
scale: 'week',
step: 1
},
width: '100%',
locale:'fr',
editable: true,
margin: {
item: 20
}
};
// Create a Timeline
var timeline = new vis.Timeline(container, data, options);
Thanks !
Regards
The text was updated successfully, but these errors were encountered: