superset icon indicating copy to clipboard operation
superset copied to clipboard

Weekly time grain: ticks and markers not aligned

Open nbonnotte opened this issue 8 years ago • 6 comments

Make sure these boxes are checked before submitting your issue - thank you!

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

Superset version

0.22.1

Expected results

On a line chart or percent-change chart, with a PostgreSQL backend and a weekly time grain, I would expect the x-axis ticks to match the markers, which are set on Mondays

Actual results

Markers are aligned on Mondays. Because that's what PostgreSQL sends, I guess, since DATE_TRUNC follows the ISO standard, and DATE_TRUNC('week', '2018-01-23') returns Monday 24.

X-ticks are aligned on Sundays. This is wrong.

Steps to reproduce

Do a line chart with a weekly time grain on a PostgreSQL backend

nbonnotte avatar Jan 23 '18 09:01 nbonnotte

Related? https://github.com/apache/incubator-superset/issues/971

xrmx avatar Jan 23 '18 09:01 xrmx

Close, but no. This is a front-end issue only

nbonnotte avatar Jan 23 '18 11:01 nbonnotte

I have this issue but with a MySQL database. When I am selecting the time grain to be week_start_monday on a time series graph, the markers show Mondays but the xticks show Sundays.

StephTruong avatar Aug 07 '18 04:08 StephTruong

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 .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Apr 10 '19 17:04 stale[bot]

Hi I got the same issue, the difference only in the chart the X-axis not show any particular days just random days. How to make the weekly time grain X-axis matches with the markers. Screen Shot 2022-04-04 at 16 37 50

fikriabror avatar Apr 04 '22 09:04 fikriabror

Hi I got the same issue, the difference only in the chart the X-axis not show any particular days just random days. How to make the weekly time grain X-axis matches with the markers. Screen Shot 2022-04-04 at 16 37 50

Did you get any solutions here?

Pedrowach avatar Apr 24 '24 16:04 Pedrowach