Title: [TASK] ✨ Add Percentage Calculation Utility · Issue #1 · EricSoder/PowerBI-JavaScript-Fork · GitHub
Open Graph Title: [TASK] ✨ Add Percentage Calculation Utility · Issue #1 · EricSoder/PowerBI-JavaScript-Fork
X Title: [TASK] ✨ Add Percentage Calculation Utility · Issue #1 · EricSoder/PowerBI-JavaScript-Fork
Description: ✨ Add Percentage Calculation Utility 📄 Description We need a utility function to calculate percentages within the PowerBI JavaScript library. This utility will streamline scenarios where percentage calculations are needed, such as: 📊 Ren...
Open Graph Description: ✨ Add Percentage Calculation Utility 📄 Description We need a utility function to calculate percentages within the PowerBI JavaScript library. This utility will streamline scenarios where percentage...
X Description: ✨ Add Percentage Calculation Utility 📄 Description We need a utility function to calculate percentages within the PowerBI JavaScript library. This utility will streamline scenarios where percentage...
Opengraph URL: https://github.com/EricSoder/PowerBI-JavaScript-Fork/issues/1
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[TASK] ✨ Add Percentage Calculation Utility","articleBody":"# ✨ Add Percentage Calculation Utility\n## 📄 Description\nWe need a utility function to calculate percentages within the PowerBI JavaScript library. This utility will streamline scenarios where percentage calculations are needed, such as:\n- 📊 Rendering percentage-based visualizations.\n- ⏳ Displaying progress indicators.\n- 📈 Calculating relative metrics for data processing.\n## 🛠️ Requirements\n- Add a function to calculate percentages based on a `part` and a `total`.\n- Ensure the function:\n - Returns `0` if the `total` is `0`. 🛑\n - Handles edge cases gracefully. ✅\n- Place the function in the appropriate utilities or helper file. 📂\n## ✅ Acceptance Criteria\n- 🖋️ A fully implemented `calculatePercentage` utility function.\n- 🧪 Comprehensive unit tests validating its functionality written in Jest.\n- 📝 Clear and concise documentation accompanying the function.\n## 💡 Rationale\nThis utility will:\n- 🧹 Improve code reusability and readability.\n- 🚀 Reduce redundancy in calculating percentages across the codebase.\n- 🛡️ Ensure consistent implementation of percentage logic.\n## 🔥 Priority\n**Medium**\n## 🔍 Additional Notes\n- Ensure the function adheres to existing code style and patterns within the repository. 🎨\n- Maintain clarity and simplicity to support future enhancements. 📈\n","author":{"url":"https://github.com/EricSoder","@type":"Person","name":"EricSoder"},"datePublished":"2025-02-18T14:50:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1/PowerBI-JavaScript-Fork/issues/1"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4b25fe59-c92d-794f-5fea-ce88fe3017c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3A6:418ED:9F700D5:DD9260E:6A507943 |
| html-safe-nonce | 7b5b6295d84d1670ebbececc524baa1274030c45d73ddfdb1ac3f95af40c4e21 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0E2OjQxOEVEOjlGNzAwRDU6REQ5MjYwRTo2QTUwNzk0MyIsInZpc2l0b3JfaWQiOiIxMzI1ODEwMzI1MzU0NzQwMDM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 342698abbebbf5c23ab1e19de5a638083150eea1353f2e5daa7baf9d3a6ed5a1 |
| hovercard-subject-tag | issue:2860686249 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/EricSoder/PowerBI-JavaScript-Fork/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f52df6878ecb71f69a0f354aa4ff01f5504801c7fa1f943f64dc7499a0768c59/EricSoder/PowerBI-JavaScript-Fork/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f52df6878ecb71f69a0f354aa4ff01f5504801c7fa1f943f64dc7499a0768c59/EricSoder/PowerBI-JavaScript-Fork/issues/1 |
| og:image:alt | ✨ Add Percentage Calculation Utility 📄 Description We need a utility function to calculate percentages within the PowerBI JavaScript library. This utility will streamline scenarios where percentage... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EricSoder |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/EricSoder/PowerBI-JavaScript-Fork git https://github.com/EricSoder/PowerBI-JavaScript-Fork.git |
| octolytics-dimension-user_id | 70255364 |
| octolytics-dimension-user_login | EricSoder |
| octolytics-dimension-repository_id | 934875782 |
| octolytics-dimension-repository_nwo | EricSoder/PowerBI-JavaScript-Fork |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 43329338 |
| octolytics-dimension-repository_parent_nwo | microsoft/PowerBI-JavaScript |
| octolytics-dimension-repository_network_root_id | 43329338 |
| octolytics-dimension-repository_network_root_nwo | microsoft/PowerBI-JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width