diff --git a/src/components/Charts/AxisBottom.tsx b/src/components/Charts/AxisBottom.tsx index 988ea723d00bbf98750b5bbcaff3a3c89eb44bd4..28014c8654bf049393307268b047e837a0994efc 100644 --- a/src/components/Charts/AxisBottom.tsx +++ b/src/components/Charts/AxisBottom.tsx @@ -39,9 +39,7 @@ function TextAxis({ return ( <text y="10" dy="0.71em" transform={`translate(${width})`}> <tspan className={style} textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ year: 'numeric' })} + {dataload.date.toLocaleString({ year: 'numeric' })} </tspan> </text> ) @@ -49,9 +47,7 @@ function TextAxis({ return ( <text y="10" dy="0.71em" transform={`translate(${width})`}> <tspan className={style} textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ month: 'narrow' })} + {dataload.date.toLocaleString({ month: 'narrow' })} </tspan> </text> ) @@ -61,14 +57,10 @@ function TextAxis({ return ( <> <tspan className={style} x="0" textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ weekday: 'narrow' })} + {dataload.date.toLocaleString({ weekday: 'narrow' })} </tspan> <tspan className={style} x="0" dy="1.2em" textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ day: 'numeric' })} + {dataload.date.toLocaleString({ day: 'numeric' })} </tspan> </> ) @@ -78,15 +70,12 @@ function TextAxis({ <tspan className={style} x="0" textAnchor="middle"> {capitalize( dataload.date - .setLocale('fr-FR') .toLocaleString({ weekday: 'short' }) .substring(0, 3) )} </tspan> <tspan className={style} x="0" dy="1.2em" textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ day: 'numeric' })} + {dataload.date.toLocaleString({ day: 'numeric' })} </tspan> </> ) @@ -104,14 +93,10 @@ function TextAxis({ return ( <text y="10" dy="0.71em" transform={`translate(${width})`}> <tspan className={style} x="0" textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ weekday: 'narrow' })} + {dataload.date.toLocaleString({ weekday: 'narrow' })} </tspan> <tspan className={style} x="0" dy="1.2em" textAnchor="middle"> - {dataload.date - .setLocale('fr-FR') - .toLocaleString({ day: 'numeric' })} + {dataload.date.toLocaleString({ day: 'numeric' })} </tspan> </text> ) diff --git a/src/components/Charts/__snapshots__/AxisBottom.spec.tsx.snap b/src/components/Charts/__snapshots__/AxisBottom.spec.tsx.snap index dd321196e7290b0bf856235e533e89b974dada6a..f468fcd4dbd5c46e5528dbf9e34a4a8e16e8a4a3 100644 --- a/src/components/Charts/__snapshots__/AxisBottom.spec.tsx.snap +++ b/src/components/Charts/__snapshots__/AxisBottom.spec.tsx.snap @@ -22,7 +22,7 @@ exports[`AxisBottom component test should correctly render DAY format of AxisBot text-anchor="middle" x="0" > - J + T </tspan> <tspan class="tick-text tick-text-selected chart-ticks-x-text" @@ -49,7 +49,7 @@ exports[`AxisBottom component test should correctly render DAY format of AxisBot text-anchor="middle" x="0" > - V + F </tspan> <tspan class="tick-text chart-ticks-x-text" @@ -266,7 +266,7 @@ exports[`AxisBottom component test should correctly render WEEK format of AxisBo text-anchor="middle" x="0" > - J + T </tspan> <tspan class="tick-text tick-text-selected chart-ticks-x-text" @@ -293,7 +293,7 @@ exports[`AxisBottom component test should correctly render WEEK format of AxisBo text-anchor="middle" x="0" > - V + F </tspan> <tspan class="tick-text chart-ticks-x-text"