Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/lib/template_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ def heatmap_with_filter(
invert_month,
invert_hour,
title,
z_range=None,
):
"""General function that returns a heatmap."""
variable = VariableInfo.from_col_name(var)
Expand Down
15 changes: 8 additions & 7 deletions pages/natural_ventilation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dash
from dash import dcc
from dash import no_update
import dash_mantine_components as dmc
from dash_extensions.enrich import Output, Input, State, callback

Expand All @@ -12,7 +13,6 @@
tight_margins,
month_lst,
)
from pages.lib.utils import get_max_min_value
from pages.lib.template_graphs import filter_df_by_month_and_hour
from pages.lib.global_variables import Variables, VariableInfo
from pages.lib.global_element_ids import ElementIds
Expand Down Expand Up @@ -278,6 +278,8 @@ def nv_heatmap(
invert_hour,
si_ip,
):
if df is None:
return no_update
# enable or disable button apply filter DPT
dpt_data_filter = enable_dew_point_data_filter(condensation_enabled)

Expand Down Expand Up @@ -320,19 +322,16 @@ def nv_heatmap(

filter_unit = filter.get_unit(si_ip)

var_range = variable.get_range(si_ip)

var_name = variable.get_name()

filter_name = filter.get_name()

var_color = variable.get_color()

if global_local == "global":
range_z = var_range
if si_ip == UnitSystem.IP:
range_z = [32.0, 86.0]
else:
data_max, data_min = get_max_min_value(df[var])
range_z = [data_min, data_max]
range_z = [0.0, 30.0]

title = (
f"Hours when the {var_name} is in the range {min_dbt_val} to"
Expand Down Expand Up @@ -420,6 +419,7 @@ def nv_heatmap(
Input(ElementIds.NV_MONTH_HOUR_FILTER, "n_clicks"),
Input(ElementIds.NV_DBT_FILTER, "n_clicks"),
Input(ElementIds.NV_DPT_FILTER, "n_clicks"),
Input(ElementIds.ID_NATURAL_VENTILATION_GLOBAL_LOCAL_RADIO_INPUT, "value"),
Input(ElementIds.SWITCHES_INPUT, "checked"),
Input(ElementIds.ENABLE_CONDENSATION, "value"),
],
Expand All @@ -441,6 +441,7 @@ def nv_bar_chart(
time_filter,
dbt_data_filter,
click_dpt_filter,
global_local,
normalize,
condensation_enabled,
df,
Expand Down
2 changes: 1 addition & 1 deletion tests/node/cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function click_tab(name) {
}

function load_epw() {
cy.get('input[type=file]').selectFile('test.epw', {force: true});
cy.get('input[type=file]').selectFile('test.epw', { force: true });
}

describe('Clima', () => {
Expand Down
Loading