-
Notifications
You must be signed in to change notification settings - Fork 3
feat: profit and loss - quarter and year scopes #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| import { CategoricalChartFunc } from 'recharts/types/chart/generateCategoricalChart' | ||
| import { Props as LegendProps } from 'recharts/types/component/DefaultLegendContent' | ||
|
|
||
| const getChartWindow = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I moved most of such functions into ./utils.ts to thin this file
| .map(x => summarizePnL(x)) | ||
| }, [selectionMonth, chartWindow, data, loaded, compactView]) | ||
| /** @TODO temp */ | ||
| const len = period === 'year' ? 1 : period === 'quarter' ? 4 : 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Temporary - just to limit number of bars on the chart. It needs to be removed when API endpoint is ready
| @@ -0,0 +1,171 @@ | |||
| import React, { ReactNode, useState } from 'react' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this file is needed at all. The difference between "v1" and "v2" are not large but noticeable.
To discuss: how much we can modify layouts (views) provided with the package in terms of client awareness for such changes?
Description
Add quarter and year scopes to the PnL chart.
To-do:
How this has been tested?
Screen.Recording.2024-11-29.at.19.06.57.mov