You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/04 09:56:00 UTC

[GitHub] [superset] ValentinC-BR opened a new issue, #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

ValentinC-BR opened a new issue, #19507:
URL: https://github.com/apache/superset/issues/19507

   I try to use the new version of the chart, to progressively migrate from legacy to echarts.
   
   However, the timeseries bar chart v2 can't be used for 100% stacked bar chart : Some bars are not displayed when changing the contribution mode to "Ttoal".
   
   
   #### How to reproduce the bug
   
   1. Create a timeseries bar chart (v2)
   2. Select "Contribution mode : Total"
   3. Run
   4. See error
   
   ### Expected results
   
   The number of bars is the same, and all bar have a constant height : 100%
   
   ### Actual results
   
   Some bar are missing
   
   #### Screenshots
   
   ##### Without 100% stacking : 
   ![image](https://user-images.githubusercontent.com/79460908/161519995-c285f5e6-59ae-42ca-b226-29c2a985e917.png)
   
   ##### When choosing "Contribution mode : Total"
   ![image](https://user-images.githubusercontent.com/79460908/161519208-10de73e5-2499-4484-b732-cb56fe9264d5.png)
   
   
   ### Environment
   
   Browser type and version: Google Chrome Version 99.0.4844.51 (Oficial build) (x86_64)
   Superset version: 1.4.1
   Python version: 3.8.12
   Node.js version: doesn’t apply, I run on Kubernetes, using gunicorn as server
   Source : AWS Athena
   Any feature flags active: ALERT_REPORTS, ENABLE_TEMPLATE_PROCESSING, DASHBOARD_NATIVE_FILTERS
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [X] (not relevant) I have checked the superset logs for python stacktraces and included it here as text if there are 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.
   
   ### Additional context
   
   I'm also wondering why Superset has to calculate everything again, as soon as I change the contribution mode (once per contribution mode) ... Is the query sent to Athena different ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] YiouZuo commented on issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

Posted by GitBox <gi...@apache.org>.
YiouZuo commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1218298902

   I figured out a workaround, we can write our own SQL script and fill the nulls in SQL LAB and then save it as a dataset. Below is my script.
   ```
   with dates as (
   select distinct DATE_TRUNC('DAY', date) as my_date
   from public.test_null_timeseries_v2
   ),
   accounts as (
   select DISTINCT account_name
   from public.test_null_timeseries_v2
   ),
   full_list AS (
   select my_date, account_name
   from dates
   cross join accounts
   ),
   test AS (
   SELECT DATE_TRUNC('DAY', date) AS my_date,
         account_name AS account_name,
         sum(value) AS sum_value
   FROM public.test_null_timeseries_v2
   group by my_date, account_name)
   select f.my_date, f.account_name,
   CASE 
     when t.sum_value is null then 0
     else t.sum_value
     end as sum_value_filled
   from full_list as f 
   left join test as t 
   on f.my_date = t.my_date and f.account_name = t.account_name
   order by f.my_date, f.account_name
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Shazad-khan commented on issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

Posted by "Shazad-khan (via GitHub)" <gi...@apache.org>.
Shazad-khan commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1473649730

   This issue has been fixed in the recent release please recheck and close the issue
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total" [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"
URL: https://github.com/apache/superset/issues/19507


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total" [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1961997530

   Thank you @Shazad-khan for checking.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] smarmot commented on issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

Posted by GitBox <gi...@apache.org>.
smarmot commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1107464432

   Have the same issue.
   I figured out this is because the data has null values before turning on Total in Contribution mode.    
   
   Before:
   <img width="1436" alt="Screenshot 2022-04-23 at 15 24 28" src="https://user-images.githubusercontent.com/39157526/164894583-7bbbe2bb-d953-4152-b660-97f6075ab112.png">
   
   After:
   <img width="1434" alt="Screenshot 2022-04-23 at 15 28 18" src="https://user-images.githubusercontent.com/39157526/164894532-c87356eb-8fb3-46d5-a8c7-c4fc0b3de9d9.png">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] YiouZuo commented on issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

Posted by GitBox <gi...@apache.org>.
YiouZuo commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1211567090

   I have a similar issue -- Timeseries Bar Chart V2 malfunctions when there is NULL in the results, though in my case, not directly from the data.
   I'm counting each group's occurrence each month. However, some accounts may not appear in all months, creating NULL in the query results. The original data doesn't have NULL.
   
   Sample data :
   Date, Group, Occurrence
   2020-01-01, a, 2
   2020-01-01, a, 3
   2020-02-01, a, 5
   ...
   2020-06-01, a, 5
   2020-06-01, b, 1
   2020-06-01, b, 2
   2020-06-01, b, 1
   ...
   2020-06-01, c, 4
   2020-06-01, c, 1
   ...
   2021-12-01, a, 5
   2021-12-01, c, 5
   ...
   
   Screenshots show the query results: for group b, when it had no occurrence from 2021-11 to 2022-3, it's NULL, and the corresponding stacked bars on the chart are not correctly displayed (missing group c for 3 out of 5 months).
   ![Screen Shot 2022-08-10 at 10 15 08 PM](https://user-images.githubusercontent.com/15369109/184069932-0e8613e6-0b0e-4ace-84f6-1df9ac93a084.png)
   
   The test data I created (repeat 5 times for the full set):
   [test_null_timeseries_v2.csv](https://github.com/apache/superset/files/9306295/test_null_timeseries_v2.csv)
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] YiouZuo commented on issue #19507: [Timeseries Bar Chart V2] Bars disappear when changing the contribution mode to "Total"

Posted by GitBox <gi...@apache.org>.
YiouZuo commented on issue #19507:
URL: https://github.com/apache/superset/issues/19507#issuecomment-1211592315

   The Timeseries Area Chart has a similar issue:
   ![Screen Shot 2022-08-10 at 11 20 28 PM](https://user-images.githubusercontent.com/15369109/184075148-59e402ee-9d8c-42aa-aafc-6199dfedcc54.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org