Skip to content

Commit 3291416

Browse files
committed
Renamed the line chart variable.
1 parent ad41c96 commit 3291416

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web-ui/src/pages/PulseReportPage.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const PulseReportPage = () => {
105105
const [averageData, setAverageData] = useState({});
106106
const [barChartData, setBarChartData] = useState([]);
107107
const [expanded, setExpanded] = useState(false);
108-
const [lineChartData, setLineChartData] = useState([]);
108+
const [scoreChartData, setScoreChartData] = useState([]);
109109
const [pulses, setPulses] = useState([]);
110110
const [scope, setScope] = useState('Individual');
111111
const [scoreType, setScoreType] = useState(ScoreOption.COMBINED);
@@ -131,7 +131,7 @@ const PulseReportPage = () => {
131131
});
132132
date.setDate(date.getDate() + 1);
133133
}
134-
setLineChartData(data);
134+
setScoreChartData(data);
135135
136136
const frequencies = [];
137137
for (let i = 1; i <= 5; i++) {
@@ -150,7 +150,7 @@ const PulseReportPage = () => {
150150
// This creates data in the format that recharts needs from pulse data.
151151
useEffect(() => {
152152
const averageData = {}; // key is member id
153-
const lineChartDataPoints = [];
153+
const scoreChartDataPoints = [];
154154
const frequencies = [];
155155
for (let i = 1; i <= 5; i++) {
156156
frequencies.push({ score: i, internal: 0, external: 0 });
@@ -168,11 +168,11 @@ const PulseReportPage = () => {
168168
const monthPadded = month.toString().padStart(2, '0');
169169
const dayPadded = day.toString().padStart(2, '0');
170170
const date = `${year}-${monthPadded}-${dayPadded}`;
171-
const found = lineChartDataPoints.find(points => points.date === date)
171+
const found = scoreChartDataPoints.find(points => points.date === date)
172172
if(found) {
173173
found?.datapoints?.push(pulse);
174174
} else {
175-
lineChartDataPoints.push({
175+
scoreChartDataPoints.push({
176176
date,
177177
datapoints: [pulse]
178178
});
@@ -210,7 +210,7 @@ const PulseReportPage = () => {
210210
}
211211
}
212212

213-
setLineChartData(lineChartDataPoints.map(day => {
213+
setScoreChartData(scoreChartDataPoints.map(day => {
214214
const iScores = {};
215215
const eScores = {};
216216

@@ -506,7 +506,7 @@ const PulseReportPage = () => {
506506
/>
507507
<CardContent>
508508
<ResponsiveContainer width="100%" aspect={3.0}>
509-
<BarChart data={lineChartData} height={300}>
509+
<BarChart data={scoreChartData} height={300}>
510510
<Tooltip content={<CustomTooltip />} />
511511
<CartesianGrid strokeDasharray="3 3" />
512512
<XAxis

0 commit comments

Comments
 (0)