-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alterando dashboard e alterando lógican para url da api.
- Loading branch information
1 parent
9280b1d
commit 697c685
Showing
3 changed files
with
131 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
import * as React from 'react'; | ||
import { BarChart } from '@mui/x-charts/BarChart'; | ||
|
||
export default function BasicBars({nomes, dados}) { | ||
export function BasicBars({nomes, dados}) { | ||
return ( | ||
<div className='grafico'> | ||
<BarChart | ||
xAxis={[{ scaleType: 'band', data: nomes }]} | ||
series={[{data: dados}]} | ||
width={1000} | ||
height={700} | ||
/> | ||
<BarChart | ||
xAxis={[{ scaleType: 'band', data: nomes }]} | ||
series={[{data: dados}]} | ||
width={1000} | ||
height={700} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
export function StackedBarChart({nomes, pData, uData, pLabel, uvLabel}) { | ||
return ( | ||
<div className='grafico'> | ||
<BarChart | ||
width={1000} | ||
height={700} | ||
series={[ | ||
{ data: pData, label: pLabel, id: 'pvId', stack: 'total' }, | ||
{ data: uData, label: uvLabel, id: 'uvId', stack: 'total' }, | ||
]} | ||
xAxis={[{ data: nomes, scaleType: 'band' }]} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters