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 not working when 2 series have 2 different time points #31202

Open
3 tasks done
kenho811 opened this issue Dec 1, 2024 · 1 comment
Open
3 tasks done

Line Chart not working when 2 series have 2 different time points #31202

kenho811 opened this issue Dec 1, 2024 · 1 comment
Labels
viz:charts:line Related to the Line chart

Comments

@kenho811
Copy link

kenho811 commented Dec 1, 2024

Bug description

I am using the Docker Image apache/superset:4.1.1-dev. It runs superset version 4.1.1.

I have a chart which plots revenue of companies as reported in financial statements over time.

In this example, I have GOOG and NVDA. The two companies have different quarterly reporting times. Attached below is the sample data.

20241201_054749.csv

As you can see, the two series have different report times.

I notice that when plotting 2 or more series where the dates are different, no lines can be plotted.

image

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Dec 1, 2024

Hey @kenho811! I'm here to help you with any bugs, questions, or contributions you have in mind. Let's work together to resolve the issue you're facing.

I found a similar unsolved discussion that might be relevant to your issue: Can I connect the dots on my line chart without imputing data?, which was last updated on February 8, 2023 [1].

Regarding your issue with line charts not working when two series have different time points, Superset handles datasets with non-uniform time intervals by using a resampling method. If you specify a resample_rule and resample_method in the form data, the data can be adjusted to a uniform time interval. This might help in plotting your data correctly [2].

Additionally, Superset provides a connectNulls option in the transformSeries function, which can connect data points by ignoring null values, ensuring a continuous line in the chart. This might be useful if you want to connect the series despite the different time points [3].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the viz:charts:line Related to the Line chart label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz:charts:line Related to the Line chart
Projects
None yet
Development

No branches or pull requests

1 participant