-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Stepped Line Chart for Time Series? #9737
Comments
I think that you can do it with advance analytics, using the Panda.resample. 1- you create one chart with the real values as you did. If you share a sample dataset, I can try to resolve it and send you the specific details. |
Thanks for sharing the tip Eugenia! I briefly watched your video, and I think the use case is slightly difference. Your case is to have two different charts showing on the same chart. Both charts use the same set of data but one has a transformation. My case is a bit different that I have multiple lines group by symbol (and is_bid...but we can drop this field to simplify), and I just want to transform all lines with forward fill (ffill). My timestamps have millisecond precision and so the rule should be 1ms? I just tried to set rule = 1s and fill method = ffill, and re-ran the query. It makes no difference to my chart. Thanks! |
can you share some dataset ? or maybe we can get into zoom session and explore, my email is eugenia@preset.io |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Looks like a useful feature to support stock price data. Any plans for interpolated step charts. |
Hi,
I wonder whether Superset offers a stepped line chart (I have been googled for quite some times but couldn't find any).
It is like something like this.
Useful cases:
Currently, I have a database schema like this:
symbol varhcar(16);
is_bid boolean;
price double;
time timestamp(6);
And then I use "time series - line chart" as the visualization type, "sum(price)" as metrics, and group by "symbol" and "is_bid".
Then the chart will have many broken lines because not every timestamp for each set of symbol and is_bid exists for another set of symbol and is_bid. Concrete example:
DB row 1: symbol = AAPL, time = 9:00:00AM, is_bid = TRUE, price = 140.00
DB row 2: symbol = AAPL, time = 9:00:01AM, is_bid = FALSE, price = 140.05
DB row 3: symbol = AAPL, time = 9:00:03AM, is_bid = TRUE, price = 140.01
DB row 4: symbol = AAPL, time = 9:00:05AM, is_bid = FALSE, price = 140.06
Then the line for AAPL's bid price will be broken between 9:00:00 and 9:00:03 because there is no entry in the DB for time = 9:00:01AM.
One solution is to have a script to get all the unique timestamps, and then populate additional rows per symbol per is_bid based on the previous value of the corresponding set of symbol and is_bid (as "step before interpolation" makes sense in this case), creating a giant table and additional work for all stepped line charts.
Hence, it would be great that superset supports (or already supported) step line chart.
Thanks.
The text was updated successfully, but these errors were encountered: