Skip to content

Commit

Permalink
fix error datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
karenyov committed Apr 12, 2023
1 parent 4ac9e28 commit d5ba43a
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions src/components/tables/HistoryAllByRegisterTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
ResponsiveContainer,
BarChart,
Bar,
Cell,
} from "recharts";
import { FiTrash2 } from "react-icons/fi";

Expand Down Expand Up @@ -54,6 +55,9 @@ export default function HistoryAllByRegisterTable({ registerId }: Props) {
onClose: onCloseConfirm,
} = useDisclosure();

const barColors = ["red", "blue", "green"];


const columns = [
{
name: "Período",
Expand Down Expand Up @@ -199,20 +203,35 @@ export default function HistoryAllByRegisterTable({ registerId }: Props) {
margin={{
top: 5,
right: 30,
left: 50,
left: 70,
bottom: 5,
}}
>
<XAxis dataKey="period" />
<YAxis tickFormatter={moneyFormat} />
<XAxis dataKey="period" stroke="#bebec2" />
<YAxis tickFormatter={moneyFormat} stroke="#bebec2" />

<Legend />

<Bar
dataKey="totalCredit"
fill="#38A169"
// stroke="#000000"
name="Crédito"
/>

<Bar
dataKey="totalDebt"
fill="#E53E3E"
// stroke="#000000"
name="Débito"
/>
<Bar
dataKey="balanceCredit"
fill="#9F7AEA"
fill="#2B6CB0"
// stroke="#000000"
name="Saldo"
/>
<Bar name="Saldo" dataKey="totalCredit" fill="#76E4F7" />

</BarChart>
</ResponsiveContainer>
</div>
Expand Down

0 comments on commit d5ba43a

Please sign in to comment.