Skip to content
Snippets Groups Projects
Commit 09589fc9 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch '521-disable-comparison-in-analysis' into 'dev'

fix(analysis): disable comparison in graph max data

See merge request !956
parents cab41942 fbce9998
Branches
No related tags found
2 merge requests!9702.6 Release,!956fix(analysis): disable comparison in graph max data
......@@ -169,6 +169,7 @@ const MaxConsumptionCard = ({
chartData={chartData}
fluidType={currentFluid}
timeStep={TimeStep.DAY}
showCompare={false}
height={height}
width={width}
isSwitching={false}
......
......@@ -529,6 +529,7 @@ exports[`MaxConsumptionCard component should be rendered correctly 1`] = `
fluidType={0}
height={250}
isSwitching={false}
showCompare={false}
timeStep={20}
width={940}
/>
......
......@@ -8,12 +8,12 @@ import { TimeStep } from 'enum/timeStep.enum'
import { DateTime } from 'luxon'
import { Datachart } from 'models'
import React from 'react'
import { useAppSelector } from 'store/hooks'
export interface BarChartProps {
chartData: Datachart
fluidType: FluidType
timeStep: TimeStep
showCompare: boolean
width?: number
height?: number
marginLeft?: number
......@@ -28,6 +28,7 @@ const BarChart = ({
chartData,
fluidType,
timeStep,
showCompare,
width = 600,
height = 400,
marginLeft = 10,
......@@ -37,7 +38,6 @@ const BarChart = ({
isSwitching,
clickable = true,
}: BarChartProps) => {
const { showCompare } = useAppSelector(state => state.ecolyo.chart)
const getContentWidth = () => {
return width - marginLeft - marginRight
}
......
......@@ -33,7 +33,7 @@ const FluidChartSlide = ({
const client = useClient()
const dispatch = useAppDispatch()
const {
chart: { currentTimeStep, currentIndex },
chart: { currentTimeStep, currentIndex, showCompare },
global: { fluidStatus, fluidTypes },
} = useAppSelector(state => state.ecolyo)
......@@ -126,6 +126,7 @@ const FluidChartSlide = ({
chartData={chartData}
fluidType={fluidType}
timeStep={timeStep}
showCompare={showCompare}
height={height}
width={width}
isSwitching={isSwitching}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment