You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Anphisa (via GitHub)" <gi...@apache.org> on 2023/11/24 10:38:26 UTC

[I] Can't define minimum/maximum value bounds for heatmap manually [superset]

Anphisa opened a new issue, #26092:
URL: https://github.com/apache/superset/issues/26092

   I want to set the minimum/maximum value for the heatmap to set the colors accordingly. In my dataset, I often don't achieve the maximum (100%), and I want to see that reflected in the visual.
   
   #### How to reproduce the bug
   
   1. Have a dataset with two dimensions and one metric (already aggregated). Sample dataset used for bug report:
   ```
   SELECT 'Monday' AS weekday, 'morning' AS shift, ROUND((40 + random() * 20)::DECIMAL, 2) AS metric
   UNION ALL
   SELECT 'Monday', 'night', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Tuesday', 'morning', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Tuesday', 'night', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Wednesday', 'morning', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Wednesday', 'night', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Thursday', 'morning', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Thursday', 'night', ROUND((40 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Friday', 'morning', ROUND((30 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Friday', 'night', ROUND((20 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Saturday', 'morning', ROUND((30 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Saturday', 'night', ROUND((20 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Sunday', 'morning', ROUND((20 + random() * 20)::DECIMAL, 2)
   UNION ALL
   SELECT 'Sunday', 'night', ROUND((20 + random() * 20)::DECIMAL, 2)
   ```
   2. Make a heatmap with weekday on x-axis, shift on y-axis and metric as metric (will be aggregated by some function, e.g. SUM).
   3. Set 0-100 as manual value bounds for heatmap.
   
   ### Expected results
   
   The color of the maximum value cell in the heatmap to vary according to the value bounds I set.
   
   ### Actual results
   
   Value bounds are either not used at all used weirdly.
   
   #### Screenshots
   
   ##### Not normalized, no value bounds set (maximum seems to be 59.68)
   ![image](https://github.com/apache/superset/assets/15688223/9aefeb2f-5575-4c1e-a033-a2d77f0610e9)
   
   ##### Value bounds set to 0-100
   ![image](https://github.com/apache/superset/assets/15688223/feeb02f7-21d1-4125-9b0c-0c588f628d45)
   
   ##### Value bounds set to 0-1 (behaves as if no value bounds were set at all)
   ![image](https://github.com/apache/superset/assets/15688223/b073a402-850f-4edf-8914-05889644108f)
   
   ##### Normalized, value bounds set to 0-100
   ![image](https://github.com/apache/superset/assets/15688223/1c0c610d-aee3-40ac-b5bb-b40614c9cec3)
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chrome
   - superset version: `3.0.1`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] 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 tried multiple ways of achieving my goal, as documented above. Perhaps I'm using the heatmap settings wrong. How can I achieve my goal to set
   


-- 
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


Re: [I] Can't define minimum/maximum value bounds for heatmap manually [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #26092: Can't define minimum/maximum value bounds for heatmap manually
URL: https://github.com/apache/superset/issues/26092


-- 
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