Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Is it possible to skip weekend on time series chart or line chart? #14365

Closed
dongr0510 opened this issue Apr 27, 2021 · 2 comments
Closed

Is it possible to skip weekend on time series chart or line chart? #14365

dongr0510 opened this issue Apr 27, 2021 · 2 comments
Assignees
Labels
question & help wanted Use Github discussions instead viz:charts:timeseries Related to Timeseries

Comments

@dongr0510
Copy link

dongr0510 commented Apr 27, 2021

Hi guys,

I have this issue when I want to show some stock index by using superset;

Since stock market only opens several hours on weekdays, so I hope there is only Stock trading time on x-axis.

my database format
StockID: 'AAPL' Price: 130 TradingDate '2021-04-28 09:30:00'
Currently, there is only market trading time on my TradingDate column. Superset requires a date format on x-axis for either Line chart or Time-Series chart. And its template will automatically show every hour and every day.

Is it possible to remove those non trading time? or is it possible to show the time that only exists in the dataset?

This issue can be reproduced by using any stock market data; it would be better if you have hour/minute level data.

1619493466365.png

@junlincc junlincc added the question & help wanted Use Github discussions instead label Apr 28, 2021
@srinify
Copy link
Contributor

srinify commented Apr 29, 2021

To unblock you a bit @dongr0510 your best tbh is probably to adjust this at the data level. Few options:

To really solve this problem longer term, we'd need to add either a separate chart type focused on these types of datasets or add options to the Customization tab that let users of Explore hide x-axis ranges / specific things like weekends easily.

@dongr0510
Copy link
Author

@srinify Thanks for replying!

This is not a serious problem if I just want to show day level stock market data, since each week only has 2 non trading days. But for hour level stock market data, most of the time are non trading time; since each week has 168 hours, and trading hours is roughly 30% of time.

To my understanding, those two options are trying to maunally add non trading hour data, and make it 0; but I still cannot remove those non trading hour on the x-axis?

And I also found this issue on github:
#10828
I guess this new feature might solve my issue. If we could have a numeric or categorical line chart, then I can transform TradingDate to the String format; If I could have String format 'TradingDate', then the x-axis might only show non trading hour.

Hope we will have a separate chart or a new hiding x-axis range feature! Thanks!

@zhaoyongjie zhaoyongjie added the viz:charts:timeseries Related to Timeseries label Jun 17, 2021
@apache apache locked and limited conversation to collaborators Feb 2, 2022
@geido geido converted this issue into discussion #18291 Feb 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question & help wanted Use Github discussions instead viz:charts:timeseries Related to Timeseries
Projects
None yet
Development

No branches or pull requests

4 participants