Skip to content
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

feat: add Pie and Combined(bar + line) chart in HealthFragment #43

Conversation

princeraj-pr
Copy link
Contributor

This PR adds a Pie and Combined(Bar + Line) chart in HealthFragment

Fixes #13

  • Add menu(in toolbar) in HealthFragment for changing chart type
  • Add Pie chart for KCal, Time, and Distance in HealthFragment
  • Add Combined chart for KCal, Time, and Distance in HealthFragment

Screen recording

Record_2023-12-22-13-26-29.mp4

Copy link
Owner

@PratyushSingh07 PratyushSingh07 left a comment

Choose a reason for hiding this comment

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

Awesome job prince, please try to execute these changes and send them through in your next PR

app/src/main/res/menu/health_top.xml Outdated Show resolved Hide resolved
Comment on lines 17 to 19
val months = arrayOf(
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"
)
Copy link
Owner

@PratyushSingh07 PratyushSingh07 Dec 22, 2023

Choose a reason for hiding this comment

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

Use enums instead of an array. Also make sure that you define them in a separate file. So basically make an Enum by the name of Months.kt and define months there

Comment on lines 16 to 29
enum class Months {
Jan,
Feb,
Mar,
Apr,
May,
Jun,
Jul,
Aug,
Sep,
Oct,
Nov,
Dec
}
Copy link
Owner

Choose a reason for hiding this comment

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

put this inside of a new file . I had told you to put this inside Months.kt

@PratyushSingh07
Copy link
Owner

please squash your commits. To squash a commit you can use git rebase -i HEAD ~n where n is the last n commits that you want to squash

- Add menu(in toolbar) in HealthFragment for changing chart type
- Add Pie chart for KCal, Time and Distance in HealthFragment
- Add Combined chart for KCal, Time and Distance in HealthFragment
@princeraj-pr princeraj-pr force-pushed the feat/add-pie-and-combined-chart branch from 0731ec1 to bd35f27 Compare December 23, 2023 10:48
@princeraj-pr
Copy link
Contributor Author

Hey @PratyushSingh07, I fixed all the issues you mentioned in this PR. Please review and merge my PR fast as CodePeak is ending soon.

@PratyushSingh07 PratyushSingh07 merged commit 2ad6b2b into PratyushSingh07:master Dec 25, 2023
1 check passed
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.

Add a menu to visualize data in forms other than the line chart
2 participants