@@ -28,7 +28,6 @@ const CHART_COLORS = {
2828 total : "#0F766E" , // Teal 700
2929 income_tax_basic_uplift : "#0D9488" , // Teal 600
3030 income_tax_intermediate_uplift : "#0F766E" , // Teal 700
31- scp_inflation : "#14B8A6" , // Teal 500
3231 scp_baby_boost : "#2DD4BF" , // Teal 400
3332 higher_rate_freeze : "#78350F" , // Amber 900 (darkest)
3433 advanced_rate_freeze : "#92400E" , // Amber 800
@@ -53,15 +52,14 @@ function HouseholdCalculator() {
5352 const [ childAgeInput , setChildAgeInput ] = useState ( "" ) ;
5453 const [ loading , setLoading ] = useState ( false ) ;
5554 const [ error , setError ] = useState ( null ) ;
56- const [ selectedYear , setSelectedYear ] = useState ( 2026 ) ;
55+ const [ selectedYear , setSelectedYear ] = useState ( 2027 ) ;
5756 const [ showRealTerms , setShowRealTerms ] = useState ( false ) ;
5857 const [ impacts , setImpacts ] = useState ( {
5958 income_tax_basic_uplift : 0 ,
6059 income_tax_intermediate_uplift : 0 ,
6160 higher_rate_freeze : 0 ,
6261 advanced_rate_freeze : 0 ,
6362 top_rate_freeze : 0 ,
64- scp_inflation : 0 ,
6563 scp_baby_boost : 0 ,
6664 total : 0 ,
6765 } ) ;
@@ -152,7 +150,6 @@ function HouseholdCalculator() {
152150 higher_rate_freeze : result . impacts . higher_rate_freeze ,
153151 advanced_rate_freeze : result . impacts . advanced_rate_freeze ,
154152 top_rate_freeze : result . impacts . top_rate_freeze ,
155- scp_inflation : result . impacts . scp_inflation ,
156153 scp_baby_boost : result . impacts . scp_baby_boost ,
157154 total : result . total ,
158155 } ) ;
@@ -234,15 +231,14 @@ function HouseholdCalculator() {
234231 ( d . income_tax_basic_uplift || 0 ) + ( d . income_tax_intermediate_uplift || 0 ) ,
235232 d . year
236233 ) ,
237- scp : toRealTerms ( ( d . scp_inflation || 0 ) + ( d . scp_baby_boost || 0 ) , d . year ) ,
234+ scp : toRealTerms ( d . scp_baby_boost || 0 , d . year ) ,
238235 total : toRealTerms ( d . total , d . year ) ,
239236 // Keep individual reform values for tooltip
240237 income_tax_basic_uplift : toRealTerms ( d . income_tax_basic_uplift || 0 , d . year ) ,
241238 income_tax_intermediate_uplift : toRealTerms ( d . income_tax_intermediate_uplift || 0 , d . year ) ,
242239 higher_rate_freeze : toRealTerms ( d . higher_rate_freeze || 0 , d . year ) ,
243240 advanced_rate_freeze : toRealTerms ( d . advanced_rate_freeze || 0 , d . year ) ,
244241 top_rate_freeze : toRealTerms ( d . top_rate_freeze || 0 , d . year ) ,
245- scp_inflation : toRealTerms ( d . scp_inflation || 0 , d . year ) ,
246242 scp_baby_boost : toRealTerms ( d . scp_baby_boost || 0 , d . year ) ,
247243 } ) ) ;
248244
@@ -254,7 +250,7 @@ function HouseholdCalculator() {
254250 . padding ( 0.3 ) ;
255251
256252 // Dynamic Y scale based on stacked values (sum positives and negatives separately)
257- const policyKeysForScale = [ 'income_tax_basic_uplift' , 'income_tax_intermediate_uplift' , 'higher_rate_freeze' , 'advanced_rate_freeze' , 'top_rate_freeze' , 'scp_inflation' , ' scp_baby_boost'] ;
253+ const policyKeysForScale = [ 'income_tax_basic_uplift' , 'income_tax_intermediate_uplift' , 'higher_rate_freeze' , 'advanced_rate_freeze' , 'top_rate_freeze' , 'scp_baby_boost' ] ;
258254 let dataMax = 0 ;
259255 let dataMin = 0 ;
260256 processedData . forEach ( ( d ) => {
@@ -335,7 +331,6 @@ function HouseholdCalculator() {
335331 { key : 'higher_rate_freeze' , color : CHART_COLORS . higher_rate_freeze } ,
336332 { key : 'advanced_rate_freeze' , color : CHART_COLORS . advanced_rate_freeze } ,
337333 { key : 'top_rate_freeze' , color : CHART_COLORS . top_rate_freeze } ,
338- { key : 'scp_inflation' , color : CHART_COLORS . scp_inflation } ,
339334 { key : 'scp_baby_boost' , color : CHART_COLORS . scp_baby_boost } ,
340335 ] ;
341336
@@ -478,10 +473,6 @@ function HouseholdCalculator() {
478473 <span style="color:#B45309">Top rate freeze</span>
479474 <span style="font-weight:500">${ formatVal ( d . top_rate_freeze ) } </span>
480475 </div>
481- <div style="display:flex;justify-content:space-between;margin-bottom:4px">
482- <span style="color:#14B8A6">SCP inflation</span>
483- <span style="font-weight:500">${ formatVal ( d . scp_inflation ) } </span>
484- </div>
485476 <div style="display:flex;justify-content:space-between;margin-bottom:6px">
486477 <span style="color:#2DD4BF">SCP baby boost</span>
487478 <span style="font-weight:500">${ formatVal ( d . scp_baby_boost ) } </span>
@@ -605,13 +596,13 @@ function HouseholdCalculator() {
605596 . attr ( "fill" , "#6B7280" )
606597 . attr ( "font-size" , "11px" ) ;
607598
608- // Area fill
599+ // Area fill - use linear curve to show sharp cliffs (e.g., SCP eligibility)
609600 const area = d3
610601 . area ( )
611602 . x ( ( d ) => x ( d . income ) )
612603 . y0 ( y ( 0 ) )
613604 . y1 ( ( d ) => y ( d . total ) )
614- . curve ( d3 . curveMonotoneX ) ;
605+ . curve ( d3 . curveLinear ) ;
615606
616607 // Split data into positive and negative areas
617608 const positiveData = byIncomeData . map ( ( d ) => ( {
@@ -635,12 +626,12 @@ function HouseholdCalculator() {
635626 . attr ( "fill" , "rgba(180, 83, 9, 0.2)" )
636627 . attr ( "d" , area ) ;
637628
638- // Line
629+ // Line - use linear curve to show sharp cliffs (e.g., SCP eligibility)
639630 const line = d3
640631 . line ( )
641632 . x ( ( d ) => x ( d . income ) )
642633 . y ( ( d ) => y ( d . total ) )
643- . curve ( d3 . curveMonotoneX ) ;
634+ . curve ( d3 . curveLinear ) ;
644635
645636 g . append ( "path" )
646637 . datum ( byIncomeData )
@@ -727,10 +718,6 @@ function HouseholdCalculator() {
727718 <span style="color:#B45309">Top rate freeze</span>
728719 <span style="font-weight:500">${ formatVal ( closest . top_rate_freeze ) } </span>
729720 </div>
730- <div style="display:flex;justify-content:space-between;margin-bottom:4px">
731- <span style="color:#14B8A6">SCP inflation</span>
732- <span style="font-weight:500">${ formatVal ( closest . scp_inflation ) } </span>
733- </div>
734721 <div style="display:flex;justify-content:space-between;margin-bottom:6px">
735722 <span style="color:#2DD4BF">SCP baby boost</span>
736723 <span style="font-weight:500">${ formatVal ( closest . scp_baby_boost ) } </span>
0 commit comments