Skip to content

Commit c886cc8

Browse files
committed
fix format
1 parent 5d539d2 commit c886cc8

File tree

12 files changed

+221
-223
lines changed

12 files changed

+221
-223
lines changed

raspberry-pi/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

raspberry-pi/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@testing-library/jest-dom": "^5.16.5",
77
"@testing-library/react": "^13.4.0",
88
"@testing-library/user-event": "^13.5.0",
9-
"chart.js": "^4.2.0",
9+
"chart.js": "^4.2.1",
1010
"react": "^18.2.0",
1111
"react-chartjs-2": "^5.2.0",
1212
"react-dom": "^18.2.0",
@@ -19,12 +19,7 @@
1919
"test": "react-scripts test",
2020
"eject": "react-scripts eject"
2121
},
22-
"eslintConfig": {
23-
"extends": [
24-
"react-app",
25-
"react-app/jest"
26-
]
27-
},
22+
"eslintConfig": {},
2823
"browserslist": {
2924
"production": [
3025
">0.2%",

raspberry-pi/src/App.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@ import Chart4 from "./components/Chart4";
77
import Chart5 from "./components/Chart5";
88
import Chart6 from "./components/Chart6";
99
function App() {
10-
return (
11-
<div div className='container'>
12-
<Header title='Raspberry-pi data'/>
13-
<div className='flex-container'>
14-
<Chart1 />
15-
<Chart2 />
16-
<Chart3 />
17-
<Chart4 />
18-
<Chart5 />
19-
<Chart6 />
20-
</div>
21-
</div>
22-
23-
);
10+
return (
11+
<div div className='container'>
12+
<Header title='Raspberry-pi data'/>
13+
<div className='flex-container'>
14+
<Chart1 />
15+
<Chart2 />
16+
<Chart3 />
17+
<Chart4 />
18+
<Chart5 />
19+
<Chart6 />
20+
</div>
21+
</div>
22+
);
2423
}
2524

2625
export default App;
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react'
2-
import { Line } from 'react-chartjs-2';
1+
import React from "react";
2+
import { Line } from "react-chartjs-2";
33
import {
44
Chart as ChartJS,
55
CategoryScale,
@@ -9,7 +9,7 @@ import {
99
Title,
1010
Tooltip,
1111
Legend,
12-
} from 'chart.js';
12+
} from "chart.js";
1313

1414
ChartJS.register(
1515
CategoryScale,
@@ -19,35 +19,36 @@ ChartJS.register(
1919
Title,
2020
Tooltip,
2121
Legend
22-
);
22+
);
2323

2424
const Chart1 = () => {
2525
const options = {
2626
responsive: true,
2727
plugins: {
2828
title: {
2929
display: true,
30-
text: 'Placeholder'
30+
text: "Placeholder"
3131
},
3232
},
3333
};
34-
const labels = ['1', '2', '3', '4', '5', '6', '7'];
34+
const labels = ["1", "2", "3", "4", "5", "6", "7"];
3535
const data = {
36-
labels,
37-
datasets: [
38-
{
39-
label: 'Placeholder',
40-
data: [1, 5, 2, 5, 2, 4, 5],
41-
borderColor: 'rgb(230,128,15)',
42-
backgroundColor: 'rgba(230, 130, 15, 0.721)',
43-
}
36+
labels,
37+
datasets: [
38+
{
39+
label: "Placeholder",
40+
data: [1, 5, 2, 5, 2, 4, 5],
41+
borderColor: "rgb(230,128,15)",
42+
backgroundColor: "rgba(230, 130, 15, 0.721)",
43+
}
4444
],
4545
};
46+
4647
return (
4748
<div className='chartContainer'>
4849
<Line data={data} options={options}/>
4950
</div>
50-
)
51-
}
51+
);
52+
};
5253

53-
export default Chart1
54+
export default Chart1;
Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,47 @@
1-
import React from 'react'
2-
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
3-
import { Doughnut } from 'react-chartjs-2';
1+
import React from "react";
2+
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js";
3+
import { Doughnut } from "react-chartjs-2";
44

55
ChartJS.register(ArcElement, Tooltip, Legend);
66

77
const Chart2 = () => {
88
const data = {
9-
labels: ['Placeholder 1', 'Placeholder 2', 'Placeholder 3', 'Placeholder 4'],
9+
labels: ["Placeholder 1", "Placeholder 2", "Placeholder 3", "Placeholder 4"],
1010
datasets: [
11-
{
12-
label: '# of Votes',
13-
data: [12, 19, 3, 5],
14-
backgroundColor: [
15-
'rgba(230, 130, 15, 0.721)',
16-
'rgba(37, 119, 191, 0.726)',
17-
'rgba(59, 99, 140, 0.721)',
18-
'rgba(4, 45, 79, 0.721)',
19-
],
20-
borderColor: [
21-
'rgb(230,128,15)',
22-
'rgb(37,119,191)',
23-
'rgb(59,99,140)',
24-
'rgb(4,45,79)',
25-
],
26-
borderWidth: 1,
27-
},
11+
{
12+
label:" # of Votes",
13+
data: [12, 19, 3, 5],
14+
backgroundColor: [
15+
"rgba(230, 130, 15, 0.721)",
16+
"rgba(37, 119, 191, 0.726)",
17+
"rgba(59, 99, 140, 0.721)",
18+
"rgba(4, 45, 79, 0.721)",
19+
],
20+
borderColor: [
21+
"rgb(230,128,15)",
22+
"rgb(37,119,191)",
23+
"rgb(59,99,140)",
24+
"rgb(4,45,79)",
25+
],
26+
borderWidth: 1,
27+
},
2828
],
29-
};
30-
const options = {
29+
};
30+
const options = {
3131
responsive: true,
3232
plugins: {
3333
title: {
3434
display: true,
35-
text: 'Placeholder'
35+
text: "Placeholder"
3636
},
3737
},
3838
};
39+
3940
return (
4041
<div className='chartContainer'>
41-
42-
<Doughnut data={data} options={options}/>
43-
44-
42+
<Doughnut data={data} options={options}/>
4543
</div>
46-
)
47-
}
44+
);
45+
};
4846

49-
export default Chart2
47+
export default Chart2;
Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,58 @@
1-
import React from 'react';
1+
import React from "react";
22
import {
3-
Chart as ChartJS,
4-
CategoryScale,
5-
LinearScale,
6-
PointElement,
7-
LineElement,
8-
Title,
9-
Tooltip,
10-
Filler,
11-
Legend,
12-
} from 'chart.js';
13-
import { Line } from 'react-chartjs-2';
3+
Chart as ChartJS,
4+
CategoryScale,
5+
LinearScale,
6+
PointElement,
7+
LineElement,
8+
Title,
9+
Tooltip,
10+
Filler,
11+
Legend,
12+
} from "chart.js";
13+
import { Line } from "react-chartjs-2";
1414

1515
ChartJS.register(
16-
CategoryScale,
17-
LinearScale,
18-
PointElement,
19-
LineElement,
20-
Title,
21-
Tooltip,
22-
Filler,
23-
Legend
16+
CategoryScale,
17+
LinearScale,
18+
PointElement,
19+
LineElement,
20+
Title,
21+
Tooltip,
22+
Filler,
23+
Legend
2424
);
2525

2626
const Chart3 = () => {
2727
const options = {
2828
responsive: true,
2929
plugins: {
30-
title: {
31-
display: true,
32-
text: 'Placeholder',
30+
title: {
31+
display: true,
32+
text: "Placeholder",
3333
},
3434
},
3535
};
36-
const labels = ['1', '2', '3', '4', '5', '6', '7'];
36+
const labels = ["1", "1", "1", "1", "1", "1", "1",];
3737
const data = {
3838
labels,
3939
datasets: [
40-
{
41-
fill: true,
42-
label: 'Placeholder',
43-
data: [45, 65, 23, 34, 76, 12, 32],
44-
borderColor: 'rgb(59,99,140)',
45-
backgroundColor: 'rgba(59, 99, 140, 0.694)',
40+
{
41+
fill: true,
42+
label: "Placeholder",
43+
data: [45, 65, 23, 34, 76, 12, 32],
44+
borderColor: "rgb(59,99,140)",
45+
backgroundColor: "rgba(59, 99, 140, 0.694)",
4646
},
4747
],
4848
};
49+
4950
return (
5051
<div className='chartContainer'>
5152
<Line data={data} options={options}/>
5253
</div>
5354
);
54-
}
55+
};
5556

56-
export default Chart3
57+
export default Chart3;
5758

0 commit comments

Comments
 (0)