# Interactive Projection Demo # Interactive Projection Demo [#interactive-projection-demo] This artifact models a simple account expansion plan. The controls update computed metrics, a chart, and a table in the browser; the current control state is stored in the URL hash so the scenario can be shared. [GRID columns=3 min="13rem" gap="0.8rem" wide=true compact=true] [CONTROL id="accounts" type="number" min=50 max=1000 step=25 default=250 label="Starting accounts" unit="accounts"] [/CONTROL] [CONTROL id="growth_rate" type="slider" min=0 max=45 step=1 default=18 label="Annual growth" unit="%"] [/CONTROL] [CONTROL id="retention" type="slider" min=70 max=100 step=1 default=92 label="Retention" unit="%"] [/CONTROL] [/GRID] [GRID columns=3 min="14rem" gap="0.8rem" wide=true compact=true] [COMPUTED_METRIC id="year_3_accounts" label="Year 3 accounts" formula="round(accounts * pow(1 + growth_rate / 100, 3) * pow(retention / 100, 3), 0)" unit="accounts"] formula: round(accounts * pow(1 + growth_rate / 100, 3) * pow(retention / 100, 3), 0) default: 320 The static value comes from defaults; browser controls recompute it instantly. [/COMPUTED_METRIC] [COMPUTED_METRIC id="year_5_accounts" label="Year 5 accounts" formula="round(accounts * pow(1 + growth_rate / 100, 5) * pow(retention / 100, 5), 0)" unit="accounts"] formula: round(accounts * pow(1 + growth_rate / 100, 5) * pow(retention / 100, 5), 0) default: 377 This block can be referenced by downstream computed blocks or exported to LLM context. [/COMPUTED_METRIC] [COMPUTED_METRIC id="net_growth" label="Net annual growth" formula="round(((1 + growth_rate / 100) * (retention / 100) - 1) * 100, 1)" unit="%"] formula: round(((1 + growth_rate / 100) * (retention / 100) - 1) * 100, 1) default: 8.6 The formula language supports arithmetic, comparisons, and simple functions. [/COMPUTED_METRIC] [/GRID] [COMPUTED_PLOT id="accounts_curve" label="Account curve" formula="round(accounts * pow(1 + growth_rate / 100, year) * pow(retention / 100, year), 0)" domain="year:0..5" type="bar" width=720 height=220 x_label_wrap=6] formula: round(accounts * pow(1 + growth_rate / 100, year) * pow(retention / 100, year), 0) default_series (year): 250, 271, 295, 320, 347, 377 [/COMPUTED_PLOT] [COMPUTED_TABLE id="accounts_table" label="Scenario table" formula="round(accounts * pow(1 + growth_rate / 100, year) * pow(retention / 100, year), 0)" domain="year:0..5" unit="accounts" variable_label="Year" value_label="Projected accounts"] formula: round(accounts * pow(1 + growth_rate / 100, year) * pow(retention / 100, year), 0) default_series (year): 0=250, 1=271, 2=295, 3=320, 4=347, 5=377 Share a scenario by copying the URL after moving the controls. [/COMPUTED_TABLE] [EXPORT_BUTTON format="llm" target="document"] Label: Copy LLM context [/EXPORT_BUTTON] [EXPORT_BUTTON format="json" target="document"] Label: Copy JSON AST [/EXPORT_BUTTON]