superset icon indicating copy to clipboard operation
superset copied to clipboard

Adaptative Formatting month and Quarter

Open shyam2794 opened this issue 8 years ago • 10 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

20.5

Expected results

In the time grain filter on choosing month and selecting the months (jan-17 , Dec -17 , jan-18) . The result should show something like this .

screenshot from 2018-01-29 16-32-22

Actual results

But if we use adaptative formatting and choose the same time period as above , we are able to see that Jan-2017 as (2017) and jan-2018 as (2018) . This sometimes misleads the end user on what they are looking at whether year data or month wise data .

Time Grain - Month

screenshot from 2018-01-29 16-43-01

Similarly choosing quarter on time grain produces the correct results but the x-axis is still displayed in months instead of quarter . The ' X - axis ' to be displayed in quarter instead of month will be very helpfull .

Time Grain - Quarter screenshot from 2018-01-29 16-45-06

Steps to reproduce

In the time series charts , choose

  1. date field in time column
  2. under time grain choose Month
  3. Apply Filter for the month January .
  4. Under time grain choose Quarter .

Thanks

shyam2794 avatar Jan 29 '18 11:01 shyam2794

Not that i think this changed but 0.20.5 is quite old, please reproduce against a newer release

xrmx avatar Jan 29 '18 11:01 xrmx

@xrmx Thanks for the quick response . I have reproduced the same in version 22.1 , but still seeing the same results .

shyam2794 avatar Jan 29 '18 11:01 shyam2794

@xrmx @mistercrunch any update regarding this issue .

shyam2794 avatar Jan 30 '18 08:01 shyam2794

I agree that adaptative formatting could perform better, in the meantime you can specify the exact time format you want.

mistercrunch avatar Jan 30 '18 17:01 mistercrunch

@mistercrunch yes i tried specifying the x-axis format which i require . But the issue is if i choose %B-%Y which will give january 2018 , this works fine when the time grain is specified as month , but when the time grain is choosen as year , this over-rides the format where all the year data are displayed as january 2017 , january 2018 instead of 2017 , 2018 . Again this misleads the visualization .

shyam2794 avatar Jan 31 '18 08:01 shyam2794

The only way I was able to find to get month-to-date results was to use the string: one day after last month eom, which is hilarious but seems to have worked.

amancevice avatar Feb 02 '18 15:02 amancevice

https://stackoverflow.com/questions/49862866/how-to-mtd-ytd-in-apache-superset

SpyderAlba avatar Apr 01 '19 15:04 SpyderAlba

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 May 31 '19 16:05 stale[bot]

Ideally the formatting would be aware of the time granularity and pick a default based on that.

mistercrunch avatar Jun 01 '19 17:06 mistercrunch

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 Jul 31 '19 18:07 stale[bot]