sviatoslav948 Claude Opus 4.6 (1M context) commited on
Commit
cbaf025
·
1 Parent(s): 2c3a790

Use purple for holidays, keep red/orange for problem indicators

Browse files

Holidays and shortened days now use purple tones (neutral),
so red and orange remain exclusively for problem/risk signals.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. pages/3_Forecast_TT.py +8 -5
pages/3_Forecast_TT.py CHANGED
@@ -1768,7 +1768,10 @@ with tabs[0]:
1768
  hovertemplate="%{x|%d %b}<br>Chronos: %{y:,.0f}<extra></extra>",
1769
  ), secondary_y=False)
1770
  else:
1771
- _bar_colors = [RED if r.get('is_holiday') else (ORNG if r.get('is_short') else BLUE) for _, r in _fc_df.iterrows()]
 
 
 
1772
  _fig_fc.add_trace(go.Bar(
1773
  x=_fc_df['date'], y=_fc_df['orders'],
1774
  name="M2 (наив+тренд)",
@@ -1908,13 +1911,13 @@ with tabs[0]:
1908
  _is_hol = _r.get('is_holiday', False)
1909
  _is_short = _r.get('is_short', False)
1910
  if _r['uraza']:
1911
- _note_lbl = " ⚠️ Ураза-байрам"
1912
  elif _is_hol:
1913
- _note_lbl = " 🎉 Праздник"
1914
  elif _is_short:
1915
- _note_lbl = " ⏱ Сокращённый день"
1916
  elif _is_wknd:
1917
- _note_lbl = " 🏖"
1918
  else:
1919
  _note_lbl = ""
1920
  _ch_val = _ch_by_date.get(_dt.date())
 
1768
  hovertemplate="%{x|%d %b}<br>Chronos: %{y:,.0f}<extra></extra>",
1769
  ), secondary_y=False)
1770
  else:
1771
+ # Праздники и сокращённые дни — фиолетовый оттенок (нейтральный), не красный/оранжевый
1772
+ _PURP_HOL = "#8b5cf6" # фиолетовый — праздник
1773
+ _PURP_SHORT = "#a78bfa" # светло-фиолетовый — сокращённый
1774
+ _bar_colors = [_PURP_HOL if r.get('is_holiday') else (_PURP_SHORT if r.get('is_short') else BLUE) for _, r in _fc_df.iterrows()]
1775
  _fig_fc.add_trace(go.Bar(
1776
  x=_fc_df['date'], y=_fc_df['orders'],
1777
  name="M2 (наив+тренд)",
 
1911
  _is_hol = _r.get('is_holiday', False)
1912
  _is_short = _r.get('is_short', False)
1913
  if _r['uraza']:
1914
+ _note_lbl = " · Ураза-байрам"
1915
  elif _is_hol:
1916
+ _note_lbl = " · выходной (праздник)"
1917
  elif _is_short:
1918
+ _note_lbl = " · сокращённый день"
1919
  elif _is_wknd:
1920
+ _note_lbl = " · выходной"
1921
  else:
1922
  _note_lbl = ""
1923
  _ch_val = _ch_by_date.get(_dt.date())