Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -257,11 +257,11 @@ def create_heatmap(
|
|
| 257 |
if heatmap_df.empty:
|
| 258 |
return go.Figure().update_layout(title="Shortage Risk Heatmap (No Data)")
|
| 259 |
|
| 260 |
-
# Custom colorscale: red at 0%,
|
| 261 |
custom_colorscale = [
|
| 262 |
-
[0.0, 'rgb(255, 0, 0)'],
|
| 263 |
-
[0.001, 'rgb(0,
|
| 264 |
-
[1.0, 'rgb(
|
| 265 |
]
|
| 266 |
|
| 267 |
fig = go.Figure(data=go.Heatmap(
|
|
|
|
| 257 |
if heatmap_df.empty:
|
| 258 |
return go.Figure().update_layout(title="Shortage Risk Heatmap (No Data)")
|
| 259 |
|
| 260 |
+
# Custom colorscale: red at 0%, blue shades for values > 0% to 100%
|
| 261 |
custom_colorscale = [
|
| 262 |
+
[0.0, 'rgb(255, 0, 0)'], # Red at exactly 0%
|
| 263 |
+
[0.001, 'rgb(0, 0, 139)'], # Dark blue just above 0%
|
| 264 |
+
[1.0, 'rgb(135, 206, 250)'] # Light blue at 100%
|
| 265 |
]
|
| 266 |
|
| 267 |
fig = go.Figure(data=go.Heatmap(
|