Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

timeline items with overlapping texts #1417

Closed
schotman opened this issue Nov 5, 2015 · 19 comments
Closed

timeline items with overlapping texts #1417

schotman opened this issue Nov 5, 2015 · 19 comments

Comments

@schotman
Copy link

schotman commented Nov 5, 2015

My timeline view on mobile shows overlapping texts when scrolling horizontally. This issues occurs in also in the http://visjs.org/examples/timeline/items/pointItems.html example under specific situation.
Steps to reproduce:

  1. resize the chart such that the view contains items on the same line (screenshot 1)
  2. scroll to the left such that the group resizes in height
  3. scroll back to the right and see that items are overlapping (screenshot 2)

screenshot_20151105-160928
screenshot_20151105-160946

When pinching the screen redraws and everything is fine again, any idea how to invoke a redraw after a scroll?

@josdejong
Copy link
Contributor

Thanks for the detailed description, I can reproduce this bug.

There are event rangechange and rangechanged fired while moving and zooming, you could use that to force an extra redraw.

@bradh
Copy link
Contributor

bradh commented Jan 26, 2017

Still appears to occur with current version (develop branch as of 3456acf, although that particular commit is nothing to do with this bug, just the testing point).

I couldn't reproduce with the left-right sequence, but it does occasionally occur if you go right (to get the resizing) then left.

@roboslone
Copy link

This is happening to me while using react-visjs-timeline and custom CSS with .vis-item .vis-item-overflow {overflow: visible;}:
screen shot 2017-02-10 at 07 26 16

Is there a way to make timeline consider whole content width?

@mojoaxel mojoaxel modified the milestone: Major Release v5 Feb 16, 2017
@bradh
Copy link
Contributor

bradh commented Feb 18, 2017

Perhaps this is the same issue as #1982 ?

@yotamberk
Copy link
Contributor

@roboslone The addition of overflow: visible is not healthy for the timeline. it is not meant to show the contents. If you want to show contents without overlapping, use point items. The stacking function of items does not consider contents but their containers. What you are requesting is a new feature.

@bradh the original issue is indeed a duplicate

@mojoaxel
Copy link
Member

Is there a way to make timeline consider whole content width?

@roboslone This makes no sense! Timeline items have a start and a end. How would you recommend to handle dynamic sizing?

the original issue is indeed a duplicate

@yotamberk I'm not sure if this a duplicate of #1982 If so, we should close one of them.

@roboslone
Copy link

@mojoaxel, in my case almost all items are visually shorter, then their content. How does this work for point items? They have end, that isn't visible, but is considered by stacking mechanism? If so, would it be possible to have similar fake end for ranged items and only consider it for stacking, but not for drawing?

@mojoaxel
Copy link
Member

@roboslone In your case I would recommend shortening the text e.g. by removing the hash and e.g. use different colors or icons for "deactivation", "remove" and so on...
Maybe you can first figure out how you want the timeline and your content to look and than we can see if it is possible to realize! Maybe could can draw a mockup or something!?

@roboslone
Copy link

@mojoaxel, unfortunately, that's not possible, item content is provided by users, I have no control over it and I shouldn't modify info supplied by users.
As to mockup, I think it's pretty straight forward, I just want timeline to consider text length, like it does with point events.

bradh added a commit to bradh/vis that referenced this issue Feb 22, 2017
This addresses almende#1982 and almende#1417.

It possibly reduces performance, but correctness seems better.
@mojoaxel
Copy link
Member

I just want timeline to consider text length, like it does with point events.

I don't understand. Items always have a start and an end and therefore a fixed width. They are fundamentally different to point events. Why don't you use point events?

@roboslone
Copy link

@mojoaxel, it's important, that my users can clearly see start end end for each item, so I can't use point events.
Here's what I mean:
1

@mojoaxel
Copy link
Member

I still don't understand the concept on how this should work. Can anybody help please!!

@yotamberk
Copy link
Contributor

I'm sorry @roboslone but I agree with @mojoaxel . In your case it doesn't make sense to have a a range item. You say that the end time should be dependent on the text (content), but that's not what a range item is. A range item is a static range and does not change its end by zoom level. I really do think you need a point item as @mojoaxel mentioned.

yotamberk pushed a commit that referenced this issue Feb 25, 2017
…2774)

This addresses #1982 and #1417.

It possibly reduces performance, but correctness seems better.
@yotamberk
Copy link
Contributor

fixed with #2774. Thanks @bradh !

@roboslone
Copy link

@mojoaxel, @yotamberk, I think we got a misunderstanding. I don't wand end time to be dependent on the text, range item works right for me. The only problem I got is when I zoom timeline ranged items with long text get overlapped.

@bradh
Copy link
Contributor

bradh commented Feb 26, 2017

@roboslone I think you possibly have a different issue to the original bug report, and would be better tracked separately. Can you try with a new develop branch build, and verify your problem still occurs, then raise a ticket. A jsbin would be appropriate.

@mojoaxel
Copy link
Member

The only problem I got is when I zoom timeline ranged items with long text get overlapped.

@roboslone How would the user see the "end" of an item if the items just would be increased? Please open a new issue if you still think there is a feature request we should track.

marcortw pushed a commit to marcortw/vis that referenced this issue Mar 12, 2017
…lmende#2774)

This addresses almende#1982 and almende#1417.

It possibly reduces performance, but correctness seems better.
yotamberk pushed a commit that referenced this issue May 2, 2017
* Add Gitter badge (#2179)

* do not generate source-maps in distribution version

* add 'dist' folder for deployment

* added Badges

* added codeclimate badge

* added @Tooa to the support team

* added badges from isitmaintained.com (#2517)

* do not ignore dist and test folders in master

* generated dist files for v4.18.0

* generated dist files for v4.18.1

* Cheap fix for bug #2795

* Update to PR #2826 to use newline format

* changed to v4.18.1-SNAPSHOT

* chore(docs): general improvements (#2652)

* removed NOTICE file

* updated license date range to include 2017

* chore(docs): updated support team members

* chore: updated dependencies and devDependencies (#2649)

* Fixes instanceof Object statements for objects from other windows and iFrames. (#2631)

* Replaces instanceof Object checks with typeof to prevent cross tab issues.

* Adds missing space.

* chore: removed google-analytics from all examples (#2670)

* chore(docs): Add note that PRs should be submitted against the `develop` branch (#2623)

Related to: #2618
Related to: #2620

* feat(timeline): Change setCustomTimeTitle title parameter to be a string or a function (#2611)

* change setCustomTimeTitle title parameter, Now could be an string or a function
* Fixed indent and spacing

* feat(timeline): refactor tooltip to only use one dom-element (#2662)

* feat(network): Allow for image nodes to have a selected or broken image (#2601)

* feat(tests): run mocha tests in travis ci (#2687)

* Added showX(YZ)Axis options to Graph3d (#2686)

* Added showX(YZ)Axis to Graph3d

* Added show_Axis options to docs and playground example

* Resolved merge conflict

* Added show_Axis options to docs and playground example

* fix(build): use babel version compatible with webpack@1.14 (#2693)

fixes #2685

* feat(docs): use babel preset2015 for custom builds (#2678)

* add link to a mentioned example (#2709)

* chore(lint): added support for eslint (#2695)

* Trivial typo fix in how_to_help doc. (#2714)

* fix(timeline): #2598 Flickering onUpdateTimeTooltip (#2702)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Add animation to onUpdateTooltip

* fix(timeline): #778 Tooltip does not work with background items in timeline (#2703)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Make items z-index default to 1

* Add initial tests for Timeline PointItem (#2716)

* fix(timeline): #2679 TypeError: Cannot read property 'hasOwnProperty' of null (#2735)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Fix bug in item editable

* feat(timeline): #2647 Dynamic rolling mode option (#2705)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Add toggleRollingMode option
* Update docs with toggleRollingMode option

* fixes timestep next issue (#2732)

* feat(timeline): added new locales for french and espanol (#2723)

* Fix eslint problem on Travis. (#2744)

* fix: Range.js "event" is undeclared (#2749)

* fix(timeline): #2720 Problems with option editable (#2743)

Clean up and centralise edit status for Timeline Items.

* feat(network): Improve the performance of the network layout engine (#2729)

* Improve the performance of the network layout engine

Short-cut the execution of a number of methods in LayoutEngine to make them
handle highly-connected graphs better.

* Demonstrations of layouts of large networks

* Added support to supply an end to bar charts to have them scale (#2760)

* Added support to supply an X2 to bar charts to have them scale

* Fixed graph2d stacking issue.  It no longer takes into account hidden items

* Changed x2 to end per recommendation and added this to the docs

* Initial tests for timeline ItemSet. (#2750)

Somewhat more complicated setup, associated with the need for a real window.

* [Timeline] Modify redraw logic to treat scroll as needing restack. (#2774)

This addresses #1982 and #1417.

It possibly reduces performance, but correctness seems better.

* fix(timeline): #2672 Item events original event (#2704)

* Fix redraw order

* Fix error when option is not defined

* Allow template labels

* Add .travis.yml file

* Add experiment travis code

* Fix react example

* Fix events returned from mouse events

* Fix example

* Rename censor to stringifyObject in example

* [timeline] Update examples to use ISOString format. (#2791)

Resolves #2790

* [timeline] Update serialization example to use ISOString dates. (#2789)

Resolves #2696

* added github templates for issues and pull-requests (#2787)

fixes #2418

* feat(timeline): Add item data as argument to the template function (#2799)

* Fix regression introduced in #2743. (#2796)

* Fix for issue #2536 (#2803)

* Fix for issue #2536

* Adjusted documentation for fix.

* Adjustments due to review

* Grrrrr whitespace

* Fixed Travis issue

* Cheap fix for bug #2795

* Update to PR #2826 to use newline format

* Update to gitignore to reflect changes on remote

* clean dist folder

* Local gitignore update

* Just a first example file for the week scale feature

* Allowing sourcemap creation

* Initial (non-functional) commit to ensure we insert code at the right places (check TODOs)

* Functional, not bug-free version which works with locale aware week numbers.

* Locale-aware implementation and simplified major labels to a full year

* Trying to make the major labels show the correct start date

* Working implementation of week numbers using localization.

* removing development leftovers

* Updated package.json

* Reintagrate package.json from accidental deletion

* Updates for package.json

* Fixing package.json

* Integrate the week numbers feature in the documentation.

* Reverting local changes to .gitignore

* Reverting local changes

* Extending examples to cover the case when 1st day of week and 1st day of month align; Fixing display bug so that week numbers are not repeated in minorLabels

* Putting the examples into a loop
@lbrdar
Copy link

lbrdar commented Jul 2, 2018

Using overflow: visible works great now, but it seems to be limited on default template only. When I try to use React template for timeline items, overflowed label starts overlapping. Does anyone know what might be causing this or how to solve it?

@lbrdar
Copy link

lbrdar commented Jul 4, 2018

In case someone hits this in the future - the issue was that React rendering is async, and Vis was doing all the calculation too early. Solved by adding a range changed listener and, if the event wasn't caused byUser, calling redraw() method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants