Skip to content

Commit

Permalink
feat : update organisms/dailyRevenue/index.js (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
JungYeonHwi committed Oct 23, 2023
1 parent 13fdb06 commit a28529e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/organisms/dailyRevenue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const DailyRevenue = (props) => {
const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];

const orderCountsByDay = daysOfWeek.map(day => {
const dayData = data && data.filter(dataPoint => dataPoint.day === day);
const orderCountSum = dayData && dayData.reduce((total, dataPoint) => total + dataPoint.orderCount, 0);
return orderCountSum;
const dayData = data && data.filter(dataPoint => dataPoint.day === day);
const orderCountSum = dayData && dayData.reduce((total, dataPoint) => total + dataPoint.orderCount, 0);
return orderCountSum;
});

const options = {
Expand All @@ -66,7 +66,7 @@ const DailyRevenue = (props) => {
datasets: [
{
type: 'line',
label: '요일별 총 개수',
label: '요일별 총 판매 개수',
data: orderCountsByDay,
// backgroundColor: 'rgba(53, 162, 235, 0.5)',
backgroundColor: 'rgba(53, 162, 235, 0.5)',
Expand Down

0 comments on commit a28529e

Please sign in to comment.