-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from italoh623/develop
Develop
- Loading branch information
Showing
17 changed files
with
120 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
Chart as ChartJS, | ||
CategoryScale, | ||
LinearScale, | ||
PointElement, | ||
LineElement, | ||
Title, | ||
Tooltip, | ||
Legend, | ||
} from 'chart.js' | ||
import { Line } from 'react-chartjs-2' | ||
|
||
ChartJS.register( | ||
CategoryScale, | ||
LinearScale, | ||
PointElement, | ||
LineElement, | ||
Title, | ||
Tooltip, | ||
Legend | ||
) | ||
|
||
import { data } from "@/data/chart"; | ||
|
||
import styles from "./styles.module.css"; | ||
import { useEffect, useRef } from 'react'; | ||
|
||
const options = { | ||
plugins: { | ||
legend: { | ||
display: true, | ||
}, | ||
}, | ||
scales: { | ||
x: { | ||
display: false, | ||
}, | ||
y: { | ||
display: false, | ||
}, | ||
}, | ||
elements: { | ||
line: { | ||
tension: 0.4, // Adiciona uma curvatura na linha | ||
}, | ||
}, | ||
}; | ||
|
||
|
||
export default function Chart() { | ||
return( | ||
<div className={styles.container}> | ||
<Line data={data} options={options} /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.container { | ||
height: 500px; | ||
width: 100%; | ||
/* border: 2px solid #2F2012; */ | ||
} |
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,7 +1,4 @@ | ||
.container { | ||
position: relative; | ||
top: -150px; | ||
|
||
padding: 50px 100px; | ||
padding-bottom: 0px !important; | ||
|
||
|
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
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
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
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,7 +1,4 @@ | ||
.container { | ||
position: relative; | ||
top: -150px; | ||
|
||
padding: 50px 100px; | ||
padding-bottom: 0px !important; | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const data = { | ||
labels: ['1900', '1909', '1930', '1960', '1970', '1990', '2024'], | ||
datasets: [ | ||
{ | ||
label: 'Eventos', | ||
data: [0, 1, 5, 7, 6, 5, 0], // Exemplo de dados. Substitua pelos seus dados reais. | ||
backgroundColor: '#9B1915', // Cor do preenchimento do gráfico | ||
borderColor: '#2F2012', // Cor da linha do gráfico | ||
borderWidth: 5, // Largura da linha do gráfico | ||
pointBackgroundColor: '#9B1915', // Cor dos pontos | ||
pointBorderColor: '#9B1915', // Cor da borda dos pontos | ||
pointHoverBackgroundColor: '#fff', // Cor do fundo ao passar o mouse sobre os pontos | ||
pointRadius: 7, | ||
pointHoverBorderColor: '#9B1915', // Cor da borda ao passar o mouse sobre os pontos | ||
} | ||
], | ||
}; |
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