Skip to content
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

Fix auto-scaling issue #6

Open
EliJDonahue opened this issue Jul 20, 2018 · 0 comments
Open

Fix auto-scaling issue #6

EliJDonahue opened this issue Jul 20, 2018 · 0 comments
Labels
Help Wanted Assistance is welcome. Type: Bug Something is not working.

Comments

@EliJDonahue
Copy link
Member

If you don't specify a scale for the timeline, vis.js will determine the best scale and use that to render the diagram. If some tasks have a duration of seconds or milliseconds, vis.js tries to pick a scale that will accurately reflect their duration. This is a problem because there is a 1000-line maximum on the number of lines/units that vis.js will display.

If you have tasks that last seconds (ex: created an item for testing and immediately voted) and tasks that last days (ex: waited to vote, or pending tasks with an estimated duration), the diagram just won't display and the console will log an error about the maximum number of lines.

One possible solution is to round timestamps to the nearest minute or hour before defining the objects in memory used by the vis.js timeline. This won't be super accurate, but it won't harm the underlying data in the database and it may allow the diagram to load.

It may also be possible to specify min/max scales for the timeline. I think that would be a preferable solution if vis.js supports it.

@EliJDonahue EliJDonahue added Type: Bug Something is not working. Help Wanted Assistance is welcome. labels Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Assistance is welcome. Type: Bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant