feat: add GenesysCX study and fix Streamlit chart key collisions
- Add 202512_GenesysCX TEI study (config, seed data, notebooks, README) with NPV $10.8M / ROI 266% including AI-token cost line - Add explicit `key` parameter to all chart wrappers in app/components to prevent StreamlitDuplicateElementId errors when the same figure type renders across Summary/Benefits/Costs tabs - Render benefits bar and cost pie charts on their respective tabs - Add benefits_vs_costs_by_year chart wrapper
This commit is contained in:
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import streamlit as st
|
||||
|
||||
from app.components import charts
|
||||
from app.components.tables import df_to_values, value_editor
|
||||
from app.utils import icon
|
||||
|
||||
@@ -50,3 +51,18 @@ def render(client: TEIClient, tool: dict) -> None:
|
||||
"are end-of-year cashflows. Costs are risk-adjusted upward "
|
||||
"(higher risk → higher cost)."
|
||||
)
|
||||
|
||||
if values:
|
||||
st.divider()
|
||||
col_pie, col_year = st.columns(2)
|
||||
with col_pie:
|
||||
charts.cost_pie(values, key=f"costs_tab_pie_{public_id}")
|
||||
with col_year:
|
||||
benefit_values = [
|
||||
v
|
||||
for v in safe(client.get_values, public_id) or []
|
||||
if v.get("table") == "benefits"
|
||||
]
|
||||
charts.benefits_vs_costs_by_year(
|
||||
benefit_values, values, key=f"costs_tab_by_year_{public_id}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user