Skip to content

Feature/reservoir history chart#202

Open
josemi1189 wants to merge 10 commits intomainfrom
feature/reservoir-history-chart
Open

Feature/reservoir history chart#202
josemi1189 wants to merge 10 commits intomainfrom
feature/reservoir-history-chart

Conversation

@josemi1189
Copy link
Copy Markdown
Collaborator

Closed #199

@josemi1189 josemi1189 requested a review from manudous April 9, 2026 10:33
averageOneYearAgo={dataOneYearAgo.average}
monthTenYearsAgo={dataTenYearsAgo.month}
yearTenYearsAgo={dataTenYearsAgo.year}
averageTenYearsAgo={dataTenYearsAgo.average}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the best option is to pass dataTenYearsAgo and dataOneYearAgo instead of splitting each property individually

averageOneYearAgo: number;
monthTenYearsAgo: number;
yearTenYearsAgo: number;
averageTenYearsAgo: number;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass dataTenYearsAgo dataOneYearAgo instead

dataOneYearAgo={{
average: dataOneYearAgo.average,
month: dataOneYearAgo.month,
year: dataOneYearAgo.year,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change this to dataOneYearAgo={dataOneYearAgo}

<HistoryChart
reservoirName={reservoirData.nombre}
currentLevel={reservoirData.currentVolume}
maxCapacity={reservoirData.totalCapacity}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can change this properties to reservoirData={reservoirData}

const expectResult = {
month: 3,
average: 54,
year: new Date().getFullYear() - 1,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manudous its posible mock this, or its not worth it ?

generatedAt: metadata.generatedAt,
periodoInicio: metadata.periodoInicio,
periodoFin: metadata.periodoFin,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this option its more clear

meses: monthly.map((month) => (month)),
metadata: metadata,

generatedAt: metadata.generatedAt,
periodoInicio: metadata.periodoInicio,
periodoFin: metadata.periodoFin,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meses: monthly.map((month) => (month)),
metadata: metadata,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Historical chart of reservoirs over the last 10 years

2 participants