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

🐛 (grapher) show timeline on table tab if necessary #3458

Merged
merged 1 commit into from
May 20, 2024

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Apr 8, 2024

Summary

  • Stacked area and bar charts as well as line charts show multiple years at once (since time is plotted on the x-axis)
  • If the timeline is hidden, the chart thus shows the whole range of data points (all values from start time to end time), but the table only shows data points for the start and end time exclusively
  • This PR makes it so that the timeline is always shown on the table tab for stacked bar/area and line charts
  • Datasette: Stacked area/bar and line charts where the timeline is hidden

Data cleanup

Copy link
Member Author

sophiamersmann commented Apr 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @sophiamersmann and the rest of your teammates on Graphite Graphite

@sophiamersmann sophiamersmann changed the title 🐛 (stacked bar/area) show timeline on table tab 🐛 (grapher) show timeline on table tab if necessary Apr 8, 2024
@sophiamersmann sophiamersmann marked this pull request as ready for review April 8, 2024 11:18
@marcelgerber
Copy link
Member

Hm, what's super weird about this is that changing the timeline selection on the table tab changes what's shown on the chart tab - but then back on the chart tab, there's no way to "go back" to the initial timeline selection.

Assuming that the decision to hide the timeline has been made consciously, this shouldn't be possible.

@sophiamersmann
Copy link
Member Author

I'm not sure what you mean. Do you have an example chart?

@marcelgerber
Copy link
Member

I think it's gonna be everyone? See the video (in there, it's http://staging-site-table-timeline/grapher/natural-disasters-by-type).

CleanShot.2024-04-09.at.12.14.44.mp4

@sophiamersmann
Copy link
Member Author

Ah, now I know what you mean. Hmm..

Copy link

github-actions bot commented May 1, 2024

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label May 1, 2024
@github-actions github-actions bot closed this May 5, 2024
@marcelgerber marcelgerber reopened this May 6, 2024
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Sorry for the late review, this makes sense to me now. Great!

@owidbot
Copy link
Contributor

owidbot commented May 7, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-table-timeline

SVG tester:

Number of differences (default views): 0
Number of differences (all views): 70 (8f99ef)

Edited: 2024-05-15 15:46:53 UTC
Execution time: 1.34 seconds

@sophiamersmann sophiamersmann force-pushed the table-timeline branch 6 times, most recently from bfa0b09 to c9935d3 Compare May 14, 2024 09:50
@sophiamersmann
Copy link
Member Author

Hey @marcelgerber, thanks for the review! There was another bug here where a line chart turned into a discrete bar chart when you dragged the handles onto the same year on the table tab. I updated the isLineChartThatTurnedIntoDiscreteBar to fix this. Can you have a quick look to see if that makes sense to you? 😇

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Good on you for catching that case! 🙌🏻

@sophiamersmann sophiamersmann merged commit 0e85ff4 into master May 20, 2024
30 of 35 checks passed
@sophiamersmann sophiamersmann deleted the table-timeline branch May 20, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grapher's data table sometimes doesn't show all plotted data
3 participants