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 timeline chart by explicitly setting start and end time #3772

Merged
merged 5 commits into from
Feb 14, 2019

Conversation

daniel-wer
Copy link
Member

@daniel-wer daniel-wer commented Feb 13, 2019

Users with only a single sub-second timerange triggered this bug: google/google-visualization-issues#2269

I fixed it by explicitly setting a start and end time for the timeline start (the range the user selected), which is better than the adaptive start/end from before anyways imo. This way it is easier to see which days the selected tracer actually worked and which not.

I also upgraded the charts lib to v2 (v3 didn't work) to get rid of an old version of react that was included specifically for this lib.

Single Day (which triggered the bug before):
single-day

Range:
timeranges

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Open a task and set a single node, then close it again.
  • Open the timeline view and select today's date - the chart should render and not crash.

Issues:


@daniel-wer daniel-wer added the bug label Feb 13, 2019
@daniel-wer daniel-wer self-assigned this Feb 13, 2019
@daniel-wer daniel-wer requested a review from normanrz February 13, 2019 12:05
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find & workaround!! :)

options={{ timeline: { singleColor: "#108ee9" } }}
options={{
timeline: { singleColor: "#108ee9" },
hAxis: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here with a reference to this PR? Otherwise, we might forget about it and re-introduce the bug again at some point 🙈

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

Successfully merging this pull request may close these issues.

Time tracking chart rendering breaks if the timespan is too short
2 participants