diff --git a/src/lib/components/budget/BudgetDetailView.svelte b/src/lib/components/budget/BudgetDetailView.svelte index c1f064568cbaa04c2153a170b56975ca8e97999a..e2ead5822efc700fc6d426713cffbaf6257305cd 100644 --- a/src/lib/components/budget/BudgetDetailView.svelte +++ b/src/lib/components/budget/BudgetDetailView.svelte @@ -219,7 +219,7 @@ if (showBill) { legend.push({ - id: "bill_allegement", + id: "bill_base", label: `${baseVariable.labels.default} ${ ["agirc_arrco", "securite_sociale", "unedic"].includes( baseVariable.organisme, @@ -847,13 +847,13 @@ /> {#if hasAllegementCustomization} <Column - fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="1" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" + fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="0.8" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" height={yFromQuantile(law)} on:click={() => changeQuantileIndex(index)} on:hover={({ detail }) => hoverColumn("law_allegement", detail)} stroke="#ffffff" - strokeWidth={1} + strokeWidth={0} x={index * calculationsCount} xScale={calculatedQuantilesXScale.range([0, width])} y={yFromQuantile(law, baseVariable.name, baseVariable.type)} @@ -876,13 +876,13 @@ /> {#if hasAllegementCustomization} <Column - fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="1" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" + fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="0.8" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" height={yFromQuantile(bill)} on:click={() => changeQuantileIndex(index)} on:hover={({ detail }) => hoverColumn("bill_allegement", detail)} stroke="#ffffff" - strokeWidth={1} + strokeWidth={0} x={index * calculationsCount + 1} xScale={calculatedQuantilesXScale.range([0, width])} y={yFromQuantile( @@ -911,13 +911,13 @@ /> {#if hasAllegementCustomization} <Column - fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="1" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" + fill="url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23fafafa" fill-opacity="0.8" fill-rule="evenodd"><path d="M 40,30 30,40 H 40 Z M 40,10 10,40 H 20 L 40,20 Z M 30,0 0,30 V 40 L 40,0 Z M 10,0 0,10 V 20 L 20,0 Z"/></g></svg>')" height={yFromQuantile(amendment)} on:click={() => changeQuantileIndex(index)} on:hover={({ detail }) => hoverColumn("amendment_allegement", detail)} stroke="#ffffff" - strokeWidth={1} + strokeWidth={0} x={index * calculationsCount + (showBillColumn ? 1 : 0) + 1} diff --git a/src/lib/variables.ts b/src/lib/variables.ts index 74e7edbcf18b942bcf2b55da1221af47bb6b3c58..55be042ada709286164402d76229facb25baf93b 100644 --- a/src/lib/variables.ts +++ b/src/lib/variables.ts @@ -394,6 +394,7 @@ export const budgetVariablesConfig: { [variableName: string]: BudgetVariable } = type: "allegement", }, allegement_general: { + allegementBaseVariableName: "cotisations_allegement_general", labels: { default: "Réduction générale", of: "de réduction générale des cotisations employeur", @@ -401,9 +402,17 @@ export const budgetVariablesConfig: { [variableName: string]: BudgetVariable } = the: "les réductions générales des cotisations employeur", }, organisme: "securite_sociale", - outputVariables: ["rfr_par_part", "allegement_general"], + outputVariables: [ + "rfr_par_part", + "allegement_general", + "cotisations_allegement_general", + ], quantileBaseVariable: ["rfr_par_part"], - quantileCompareVariables: ["allegement_general", "rfr"], + quantileCompareVariables: [ + "allegement_general", + "rfr", + "cotisations_allegement_general", + ], type: "allegement", }, chomage_employeur: { @@ -470,6 +479,27 @@ export const budgetVariablesConfig: { [variableName: string]: BudgetVariable } = quantileCompareVariables: ["contribution_solidarite_autonomie", "rfr"], type: "prelevement", }, + cotisations_allegement_general: { + labels: { + default: "Cotisations concernées par la réduction générale", + of: "de cotisations concernées par la réduction générale", + ofThe: "des cotisations concernées par la réduction générale", + the: "les cotisations concernées par la réduction générale", + }, + organisme: "securite_sociale", + outputVariables: [ + "rfr_par_part", + "allegement_general", + "cotisations_allegement_general", + ], + quantileBaseVariable: ["rfr_par_part"], + quantileCompareVariables: [ + "allegement_general", + "rfr", + "cotisations_allegement_general", + ], + type: "prelevement", + }, cotisations_employeur_assurance_chomage: { labels: { default: "Cotis. chômage totale",