Skip to content
Snippets Groups Projects
Commit 9319a068 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

fix Reduce ticks number to 2 for enedis analysis

parent e2709835
No related branches found
No related tags found
1 merge request!777Update master to V2.0
...@@ -80,6 +80,7 @@ const ElecHalfHourChart = ({ dataLoad, isWeekend }: ElecHalfHourChartProps) => { ...@@ -80,6 +80,7 @@ const ElecHalfHourChart = ({ dataLoad, isWeekend }: ElecHalfHourChartProps) => {
width={width} width={width}
marginRight={marginRight} marginRight={marginRight}
marginTop={marginTop} marginTop={marginTop}
isAnalysis={true}
/> />
<g transform={`translate(${10},${0})`}> <g transform={`translate(${10},${0})`}>
{dataLoad.map((value, index) => { {dataLoad.map((value, index) => {
......
...@@ -11,6 +11,7 @@ interface AxisRightProps { ...@@ -11,6 +11,7 @@ interface AxisRightProps {
width: number width: number
marginRight: number marginRight: number
marginTop: number marginTop: number
isAnalysis?: boolean
} }
const AxisRight = ({ const AxisRight = ({
...@@ -19,6 +20,7 @@ const AxisRight = ({ ...@@ -19,6 +20,7 @@ const AxisRight = ({
width, width,
marginRight, marginRight,
marginTop, marginTop,
isAnalysis,
}: AxisRightProps) => { }: AxisRightProps) => {
const { t } = useI18n() const { t } = useI18n()
const fluidStyle = const fluidStyle =
...@@ -31,7 +33,7 @@ const AxisRight = ({ ...@@ -31,7 +33,7 @@ const AxisRight = ({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
select(yAxisRef.current!).call( select(yAxisRef.current!).call(
axisRight(yScale) axisRight(yScale)
.ticks(4) .ticks(isAnalysis ? 2 : 4)
.tickSize(-width) .tickSize(-width)
.tickSizeOuter(0) .tickSizeOuter(0)
.tickFormat(d => .tickFormat(d =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment