File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/components/EnergyConsumptionChart Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,16 @@ import ChartDataLabels from "chartjs-plugin-datalabels"
12
12
import { useRouter } from "next/router"
13
13
import { useTranslation } from "next-i18next"
14
14
import { Bar } from "react-chartjs-2"
15
- import { useBreakpointValue , useColorModeValue } from "@chakra-ui/react"
15
+ import { useBreakpointValue } from "@chakra-ui/react"
16
16
17
17
import type { Lang } from "@/lib/types"
18
18
19
+ import { Center } from "@/components/ui/flex"
20
+
19
21
import { wrapLabel } from "@/lib/utils/charts"
20
22
import { isLangRightToLeft } from "@/lib/utils/translations"
21
23
24
+ import useColorModeValue from "@/hooks/useColorModeValue"
22
25
import { useIsClient } from "@/hooks/useIsClient"
23
26
24
27
// ChartDataLabels required to display y-labels on top of bars
@@ -232,13 +235,13 @@ const EnergyConsumptionChart = () => {
232
235
233
236
return (
234
237
< div className = "my-16" >
235
- < div className = "mb-4 flex w-full items-center justify-center md:mb-6" >
238
+ < Center className = "mb-4 w-full md:mb-6" >
236
239
< div className = "relative m-auto mb-4 h-[300px] w-[80vw] max-w-[500px] md:mb-0 md:h-[400px]" >
237
240
{ isClient && (
238
241
< Bar options = { chartOptions } data = { chartData } updateMode = "none" />
239
242
) }
240
243
</ div >
241
- </ div >
244
+ </ Center >
242
245
243
246
< p className = "text-center font-semibold" >
244
247
{ t ( "page-what-is-ethereum-energy-consumption-chart-legend" ) }
You can’t perform that action at this time.
0 commit comments