-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add bar chart to IHME-UI #171
Conversation
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.
This looks really good Kat, and I'm excited to try this out in some projects! Thanks for making the effort to get this done.
Most of my comments are re formatting and documentation, but there are a few that relate to things now showing up (legends in the demos) and one typo that could cause problems. Let me know if you have any questions. Good work!
Codecov Report
@@ Coverage Diff @@
## master #171 +/- ##
==========================================
- Coverage 89.17% 86.73% -2.45%
==========================================
Files 74 93 +19
Lines 2107 2615 +508
Branches 405 510 +105
==========================================
+ Hits 1879 2268 +389
- Misses 225 342 +117
- Partials 3 5 +2
Continue to review full report at Codecov.
|
6170173
to
e314877
Compare
I've refactored the bar-chart components in this PR. The biggest changes are:
|
393f8fd
to
94b792f
Compare
It's a default export, not a named export.
The build:all script was removing output directories, but the individual build scripts ('commonjs', 'es', 'umd') did not.
There's no 'legend-wrapper' class defined in the corresponding style.css, so I can't see a purpose for this div.
This will allow navigation in code editors. It should preserve the existing functionality on GitHub.
There's no need to form a separate data structure for the legend items. We can just use the subcategory names, then supply accessors to translate these names to the appropriate values.
Putting a ResponsiveContainer inside this component is problematic. If a consumer of the component doesn't apply styles correctly, either to the containing element or via style props, the component is likely to render with height and/or width of 0, making the chart invisible. The revised interface requires specifying the chart dimensions (with defaults applied if not specified). While this approach offers a bit less flexibility, I think it makes the sizing easier to understand and consumption of the component far less error-prone.
- Adding Bao Dinh - Adding everyone's GitHub profile URLs
3426e6f
to
4383d68
Compare
- "preversion" now begins with "npm install." Since we're bundling some dependencies in the UMD build, we want to make sure the packages actually installed in node_modules are up to date with the specified dependencies in package.json and package-lock.json. - "postversion" now explicitly specifies the URL of the GitHub repo. This should make the script work even if some assumptions (like having a Git remote set up or having a local branch tracking the remote "master") aren't satisfied.
react-dom is not actually a runtime dependency.
Apologies for the large pull request.
This pull-request includes the all of the work that Bao did last summer and my updates based on Gabe and Aaron's initial comments on Bao's work. It also includes the update to React 16 necessary to bring it up to date. It also includes my more recent work to make a composition component that is more flexible than how Bao had his set up.
'Stacked' can be anything from a regular bar-chart to a grouped multi bar-chart to a stacked multi bar-chart. Ideally this one component will be able to handle most options one might need, it just depends on how the data is structured.