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

Line chart. Event annotation not work #24374

Open
slavanorm opened this issue Jun 13, 2023 · 10 comments
Open

Line chart. Event annotation not work #24374

slavanorm opened this issue Jun 13, 2023 · 10 comments
Labels
#bug Bug report bug-bash validation:required A committer should validate the issue

Comments

@slavanorm
Copy link

slavanorm commented Jun 13, 2023

Line chart. Event annotation not work.
error raised from python (raises every time):
telegram-cloud-photo-size-4-5769422933448572157-y

How to reproduce the bug

  1. create a line chart
  2. add Event annotation
  3. click apply/ok and get the error

Screenshots

Screenshot 2023-06-13 at 10 17 06

Environment

  • superset version: 2.1.0
  • python version: 3.10

Checklist

  • [v] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [v] I have reproduced the issue with at least the latest released version of superset.
  • [v] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

SQL server: psql 14
failed annotation with "superset annotation" and "table", same error.

works on 1.5.3, so feels like recent changes are breaking

@slavanorm slavanorm added the #bug Bug report label Jun 13, 2023
@padbk
Copy link
Contributor

padbk commented Jun 13, 2023

We have had the same error on 2.1.0 when adding interval annotations too:

column p1d does not exist

To fix, I had to add a column to the dataset called p1d that was the same as the time series column and that seems to allow the annotation layer to be rendered.

It shouldn't need that though, so this is very likely to be a bug.

@slavanorm
Copy link
Author

idk.. i created p1d and P1D cols and it still not working

@slavanorm slavanorm mentioned this issue Jun 25, 2023
9 tasks
@Mavyre
Copy link

Mavyre commented Nov 9, 2023

Same here but with 'P1M' column. Event Annotation on Mixed Chart.
I can't understand what's going on, and sometimes it start to magically work

@azamrik
Copy link

azamrik commented Nov 13, 2023

This issue seems to happen when adding annotations to a chart when:

  • It has time grain (p1d is daily grain, p1w is weekly, p1m is monthly, ...etc)
  • The chart is already part of a dashboard

A work around that worked for me is to recreate the chart with the annotation and then add it to the dashboard.

@Mavyre
Copy link

Mavyre commented Nov 13, 2023

This issue seems to happen when adding annotations to a chart when:

  • It has time grain (p1d is daily grain, p1w is weekly, p1m is monthly, ...etc)
  • The chart is already part of a dashboard

A work around that worked for me is to recreate the chart with the annotation and then add it to the dashboard.

Thanks for the comment. Gave me an idea that actually works: Checking "Override Time Grain" does the job for me, even if the chart already is part of a dashboard!

@aagorelik
Copy link

The issue still persists (helm version 0.11.2), even when using Superset own Annotations Layer and Time Grain removed from the chart:

image

Or when used own table (with, or without P1D field added; and with, or without Time Grain):

image

image

@oliverlambson
Copy link

Same issue here 🤚

@konvica
Copy link

konvica commented Feb 29, 2024

Same issue. What solved it for me, was to recreate the annotations table outside of any dashboard and set time grain in the annotation table to "minute". For the line chart I use time grain "hour" or "minute".

@rusackas
Copy link
Member

Seems we have a couple workarounds, and I'm wondering if this is enough to close the issue. Since it's been silent for upward of 6 months, it's at risk of being closed as stale. Note that soon we'll also only support Superset 4.0 and up, once 4.1 is out. If people can make sure this is still an issue (it probably is) in 4.0, that'd be appreciated.

@rusackas rusackas added the validation:required A committer should validate the issue label Aug 20, 2024
@sfirke
Copy link
Member

sfirke commented Aug 28, 2024

Using 4.0.2, I heard today from a user who has a problem with annotation layers sometimes adding, sometimes not, to the same chart. I was able to replicate it though I don't understand when it fails and when it succeeds. We don't get any error message at all, maybe that's because we're using a saved Superset annotation source instead of a table? We just can't click "apply" or "OK" on the modal. Seems related to this issue, maybe has the same underlying problem.

Just now I was unable to add it to a chart. I refreshed my browser and then I could add it 😕 No error message, nothing in the application logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report bug-bash validation:required A committer should validate the issue
Projects
None yet
Development

No branches or pull requests

10 participants