Bar Graph Component #16

Merged
a258wang merged 16 commits from a258wang-bar-graph into main 2022-07-27 19:46:09 -04:00
Owner

Adds a <BarGraphHorizontal /> component and a <BarGraphVertical /> component.

Closes #1.

Possible changes for the future:

  • Refactor to make the horizontal and vertical bar graphs into one component
  • Add (optional) graph title

https://a258wang-bar-graph-csc-class-profile-staging-snedadah.k8s.csclub.cloud/playground/

Adds a `<BarGraphHorizontal />` component and a `<BarGraphVertical />` component. Closes #1. Possible changes for the future: - Refactor to make the horizontal and vertical bar graphs into one component - Add (optional) graph title https://a258wang-bar-graph-csc-class-profile-staging-snedadah.k8s.csclub.cloud/playground/
a258wang added 8 commits 2022-06-17 22:15:20 -04:00
a258wang force-pushed a258wang-bar-graph from 5709c76a81 to da3c9f92bb 2022-06-22 22:47:26 -04:00 Compare
a258wang force-pushed a258wang-bar-graph from da3c9f92bb to 293183064a 2022-07-14 20:42:54 -04:00 Compare
a258wang added 1 commit 2022-07-14 21:35:01 -04:00
continuous-integration/drone/push Build is passing Details
77d0a8a93d
Add optional axis labels
a258wang changed title from WIP: Bar Graph Component to Bar Graph Component 2022-07-15 00:20:53 -04:00
a258wang requested review from j285he 2022-07-15 00:21:10 -04:00
a258wang requested review from snedadah 2022-07-15 00:21:10 -04:00
a258wang requested review from b72zhou 2022-07-15 00:21:10 -04:00
a258wang requested review from e26chiu 2022-07-15 00:21:10 -04:00
snedadah approved these changes 2022-07-22 00:25:42 -04:00
snedadah left a comment
Owner

Looks good to me! And yeah we definitely should add the title (though maybe we should instead have some sort of wrapper title component for all the graphs)

Looks good to me! And yeah we definitely should add the title (though maybe we should instead have some sort of wrapper title component for all the graphs)
@ -0,0 +9,4 @@
.barText {
visibility: hidden;
font-family: "Inconsolata";
Owner

Do we need to specify the font family on all of these even though the font is set globally for the page?
Also small nit: If we do need to set the font, should we add the monospace fallback here?

Do we need to specify the font family on all of these even though the font is set globally for the page? Also small nit: If we do need to set the font, should we add the monospace fallback here?
Author
Owner

I just tried it, and it looks like the visx Text component automatically uses Arial if you don't specify a font, so we either have to pass the font family as a prop to the Text component, or we have to specify the font on each class as done here.

Good catch on adding the monospace fallback though.

I just tried it, and it looks like the visx Text component automatically uses Arial if you don't specify a font, so we either have to pass the font family as a prop to the Text component, or we have to specify the font on each class as done here. Good catch on adding the monospace fallback though.
a258wang added 1 commit 2022-07-27 19:40:08 -04:00
continuous-integration/drone/push Build is passing Details
21188553a8
Add monospace fallback
Author
Owner

I'm going to merge this without the graph title for now, and we can always come back later to add it if we want - in the meantime, throwing a heading above the graph would work in a pinch lol

I'm going to merge this without the graph title for now, and we can always come back later to add it if we want - in the meantime, throwing a heading above the graph would work in a pinch lol
a258wang merged commit 6735c52914 into main 2022-07-27 19:46:09 -04:00
a258wang deleted branch a258wang-bar-graph 2022-07-27 19:46:09 -04:00
a258wang referenced this issue from a commit 2022-07-27 19:46:10 -04:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/cs-2022-class-profile#16
No description provided.