{% set non_important_text = "color: lightgrey;" %} {% set important_text = "color: white !important;" %} {% set main_text = "color: #F6F5F5 !important;" %} {% set button_color = "#60CA9A !important" %} {% macro kpi_name_link(kpi_link_prefix, point) -%} {{point.kpi_name}} {%- endmacro %} {% macro button_with_link(text, link) -%} {{ text }} {%- endmacro %} {% macro anomaly_point_formatting(point, kpi_link_prefix=none) -%} {% set include_kpi_name = kpi_link_prefix is not none %} {% if point.previous_value is none or point.y == point.previous_value %} ∿ Anomalous behavior {% if include_kpi_name %} in {{ kpi_name_link(kpi_link_prefix, point) }} {% else %} detected {% endif %} - {% if point.previous_value is none %} changed to {{point.y_readable}} {% else %} with {% if point.is_hourly %} constant value {% else %} same value {% endif %} {{point.y_readable}} {% if point.is_hourly %} {% else %} as previous day {% endif %} {% endif %} {% if point.is_hourly %} from {{ point.previous_point_time_only }} to {{ point.anomaly_time_only }} {% endif %} {% else %} {% if point.y > point.previous_value %} ↑ Spike {% elif point.y < point.previous_value %} ↓ Drop {% endif %} {% if include_kpi_name %} in {{ kpi_name_link(kpi_link_prefix, point) }} {% else %} detected {% endif %} - changed to {{point.y_readable}} {% if point.previous_value_readable is not none %} from {{point.previous_value_readable}} {% endif %} ({{ point.formatted_change_percent }}) {% if point.is_hourly %} from {{ point.previous_point_time_only }} to {{ point.anomaly_time_only }} {% endif %} {% endif %} {%- endmacro %}