"use client" import { Chart, useChart } from "@chakra-ui/charts" import { Bar, BarChart, CartesianGrid, Legend, Tooltip, XAxis, YAxis, } from "recharts" export const BarChartLegendPosition = () => { const chart = useChart({ data: [ { category: "Web Server", value: 200, maxValue: 450 }, { category: "Credit Card", value: 700, maxValue: 900 }, { category: "Payment", value: 439, maxValue: 500 }, { category: "API", value: 147, maxValue: 200 }, { category: "AddToCart", value: 84, maxValue: 100 }, ], series: [ { name: "value", color: "blue.solid" }, { name: "maxValue", color: "green.solid" }, ], }) return ( } /> } /> {chart.series.map((item) => ( ))} ) }