generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Lollipops to the HealthKit Charts for Daily Details (#34)
# Add Lollipops to the HealthKit Charts for Daily Details ## ♻️ Current situation & Problem This is related to #13 where we want to help the users understand their health data more clearly. In the previous visualizations, we found it hard to identify the daily average, max, and min with the ticks and small plots. Therefore, we want to show more details when users click on a specific bar/point. ## ⚙️ Release Notes - Enable clicking on the chart bars/points to show a summary of the day, and click again to hide the summary. - For step counts, add a "lollipops" to the chart directly to show the sum of step count of the day - For oxygen saturation and heart rates, as we have all the average, max, and min of the day, it is too crowded to display them on the chart, so we show the summary above the chart. - Highlight the clicked bar/point by setting the color of average lines and other bars/points to grey and the color of the clicked bar/point to indigo to - This PR reference to the codes in the lollipop visualization from the [Swift-Charts-Examples repo](https://github.com/jordibruin/Swift-Charts-Examples/blob/main/Swift%20Charts%20Examples/Charts/LineCharts/SingleLineLollipop.swift) Below are the examples for before (left) and after one of the bars in all charts (right two) <p float="left"> <img src="https://github.com/CS342/2024-PICS/assets/32094663/9b513f44-af13-4a55-a11d-e7531062bad8" width="200"/> <img src="https://github.com/CS342/2024-PICS/assets/32094663/77a7188d-4fd7-4ad7-88a7-db7a4ec3cbb7" width="200"/> <img src="https://github.com/CS342/2024-PICS/assets/32094663/f358d568-6161-46e3-bfec-be3aa65405dc" width="200"/> </p> ## 📚 Documentation Related comments are added to the codes. ## ✅ Testing Tested the visualization and clicking manually with imported health kit data on the simulator. ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md).
- Loading branch information
Showing
3 changed files
with
195 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters