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

Trend charts should break down gracefully on missing data #42948

Closed
zbodi74 opened this issue May 21, 2024 · 2 comments · Fixed by #43090
Closed

Trend charts should break down gracefully on missing data #42948

zbodi74 opened this issue May 21, 2024 · 2 comments · Fixed by #43090
Assignees
Labels
.Escalation .Frontend Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Scalars Numbers, progress bars, gauges
Milestone

Comments

@zbodi74
Copy link

zbodi74 commented May 21, 2024

Describe the bug

Trend visualization breaks down in an unhelpful way when data is incomplete.

To Reproduce

  1. Create a native question returning a time series where the latest value is null:
    SELECT DATE '2024-05-21' AS created_at, null as v
    UNION ALL SELECT DATE '2024-05-20' , 1
    UNION ALL SELECT DATE '2024-05-19' , 2
    ORDER BY created_at
  1. Save it, and explore results
  2. Summarize: Sum of V, Group by Day:created_at
  3. Visualize: Trend
  4. (!)The following error is logged on the console: Error: The latest data point contains a null value and the visualization breaks with the triangle
    image.
  5. (!) Switching to the table view (still using trend viz) didn't resolve the issue, the triangle remains, and the data is not displayed even in table format.
  6. (!) Switching to another viz and clicking the refresh button does not clear the error. Only a full page reload resolves it.

Expected behavior

  1. The trend viz should handle incomplete data gracefully. The user should be notified if the data unavailable. (Alternatively, following the behavior of previous versions, earlier data should be displayed when possible - perhaps this could be a configurable option.)
  2. Users should be able to switch to table view even if the trend is not displayable.
  3. Switching to another visualization should clear any errors.

Logs

Console

react-dom.production.min.js:209 Error: The latest data point contains a null value
    at s.series (compute.js:182:11)
    at compute.js:234:1
[...]

Information about your Metabase installation

1.49.10

Severity

P2 - confusing

Additional context

The same data resulted in a different outcome in v1.48 - the change was computed based on the last two available values, though the dates were incorrect:
image

No response

@zbodi74 zbodi74 added Type:Bug Product defects .Needs Triage Visualization/Scalars Numbers, progress bars, gauges .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. labels May 21, 2024
@zbodi74
Copy link
Author

zbodi74 commented May 21, 2024

Adding the regression flag as this case was sort-of handled in v48.

@kamilmielnik kamilmielnik added .Team/DashViz Dashboard and Viz team Priority:P2 Average run of the mill bug .Frontend and removed .Needs Triage labels May 21, 2024
@darksciencebase darksciencebase added Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness and removed Priority:P2 Average run of the mill bug labels May 23, 2024
@JesseSDevaney JesseSDevaney self-assigned this May 23, 2024
@JesseSDevaney JesseSDevaney modified the milestones: 0.48.14, 0.49.13 May 28, 2024
@JesseSDevaney
Copy link
Contributor

Re-opening until 49 backport is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Escalation .Frontend Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Scalars Numbers, progress bars, gauges
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants