Mattc1221 opened a new issue, #26229: URL: https://github.com/apache/superset/issues/26229
## The problem Calendar Heatmaps in Superset don't allow users to select the start and end of the heatmap range even though the calendar heatmap library that we use has this functionality. Documentation is [here](https://cal-heatmap.com/docs/options/scale#domain) ## The Motivation ### Full Motivation **<details><summary>Data with specific thresholds</summary>** <p> If your data has specific thresholds or boundaries that are meaningful for your analysis, manually setting the range allows you to highlight these thresholds accurately. For example, in a temperature heat map, you might want to distinguish between temperatures above and below freezing point with different colors. </p> </details> **<details><summary>Highlighting anomalies</summary>** <p> When you want to focus on anomalies or outliers in your data, manually setting the range can help make these anomalies more apparent. For instance, in a sales data heat map, you might want to highlight exceptionally high or low sales figures. </p> </details> **<details><summary>Comparing different time periods</summary>** <p> When comparing data across different time periods, setting a consistent range ensures that the color scale is uniform. This is especially important when comparing multiple calendar heat maps side by side. </p> </details> **<details><summary>Emphasizing specific values</summary>** <p> To emphasize specific values or a particular range of values that are particularly relevant to your analysis, manually setting the range allows you to create a visualization that aligns with your objectives. </p> </details> **<details><summary>Ensuring consistent color representation</summary>** <p> When working with multiple heat maps or sharing them with others, manually setting the range helps maintain consistency in color representations, making it easier for viewers to interpret the data. </p> </details> **<details><summary>Accommodating user preferences</summary>** <p> Depending on your audience or user preferences, manually setting the range can allow for customization. Users may have different color perception or need to see the data in a specific way, and manual range setting provides flexibility. </p> </details> **<details><summary>Sensitivity to small changes</summary>** <p> In certain scientific or engineering applications, you might want to create heat maps that are sensitive to even small changes in data values. Manually setting the range allows for fine-grained control to detect subtle variations. </p> </details> **<details><summary>Clarity and readability</summary>** <p> For educational or presentation purposes, manually setting the range can enhance the clarity and readability of the heat map, making it easier for the audience to understand and interpret the information. </p> </details> **<details><summary>Highlighting specific events or patterns</summary>** <p> Manually setting the range can be used to emphasize specific events or patterns in the data. For example, in a calendar heat map showing website traffic, you might want to highlight days with significant spikes in traffic. </p> </details> **<details><summary>Adherence to domain-specific standards</summary>** <p> In some domains, there may be established standards or conventions for color-coding data in heat maps. Manually setting the range allows you to adhere to these standards accurately. </p> </details> ### TLDR An example of why we would want to specify the calendar heatmap range: 1. I want to display 2 different calendar heatmaps that span 2 different time spans. 2. I want to see the differences between the two time spans. 3. With the current implemtation we would get something like this: <img width="265" alt="Screenshot 2023-11-08 at 11 07 34 PM" src="https://github.com/apache/superset/assets/36670322/cb3defdd-64b3-45e7-99e4-e2f1ecd0199c"> <img width="233" alt="Screenshot 2023-11-08 at 11 08 35 PM" src="https://github.com/apache/superset/assets/36670322/0a20032c-3d38-4bf9-a409-a4a0b39f8213"> 4. These 2 maps look similar and at first glance convey that they are displaying the same data. However, the color range on these 2 charts don't match and can thus easily lead the user to bad data analaysis ## Proposed Solution 1. Add a required chart control with the label `Metric Range` 2. The options for `Metric Range` would be `Automatic`, `Manual` - _Note: the default value would be `Automatic` and use the same strategy we use now_ 3. Selecting `Manual` would display 2 new inputs: `Metric Range Start` and `Metric Range End` that would be integer inputs https://github.com/apache/superset/assets/36670322/af22eda0-aab7-4b3d-8e98-57166966db68 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
