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:
- Showing the bid and the ask price of stock price over time in 1 single chart.
- Showing multiple time series in one chart.
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.
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.