Commit Graph

5 Commits

Author SHA1 Message Date
Shahan Nedadahandeh 7ef5d8aa61 Fixed graph overflows (#123)
continuous-integration/drone/push Build is passing Details
Closes #110

Fixed the header not being sticky. The reason was due to the overflow-x hidden on the body. Removed that, and instead solved the root cause of the horizontal overflow, which was some graphs overflowing.

This required changing some of the compontent wrapper styles, which I think are overall improved now (slightly less hacks). But please check to make sure that the alignment of graphs and text isnt destroyed on various screen sizes. I checked and it seemed fine.

Co-authored-by: shahanneda <shahan.neda@gmail.com>
Co-authored-by: e26chiu <e26chiu@csc.uwaterloo.ca>
Reviewed-on: #123
Reviewed-by: Mark Chiu <e26chiu@csclub.uwaterloo.ca>
2022-12-30 21:52:24 -05:00
Shahan Nedadahandeh 743f050ec8 Fix tooltip not being correctly positioned for certain centered graphs (#118)
continuous-integration/drone/push Build is passing Details
Applied the fix used by the WordCloud to all graphs so that tooltips will be properly positioned, even if the graph is centered on the page. Did so by refactoring some tooltip logic in to a common getTooltipPosition used by all graphs.

One thing is that this simplifies all the tooltips to simply follow the mouse, instead of locking onto certain "blocks"/bars like in the grouped bar graph, which is more consitant with all the other tooltips, since we only had this in some cases.

Do we think that having the tooltip be sticky to a certain bar/group is important?

Closes #89

https://fix-tooltip-center-csc-class-profile-staging-snedadah.k8s.csclub.cloud/samplePage/
Co-authored-by: shahanneda <shahan.neda@gmail.com>
Reviewed-on: #118
Reviewed-by: Mark Chiu <e26chiu@csclub.uwaterloo.ca>
2022-12-28 01:54:32 -05:00
Mark Chiu 550029feb0 Change Graphs to use tooltips (Closes #97) (#112)
continuous-integration/drone/push Build is passing Details
Changes:
- Remove Text that is displayed when hovering over the bar in the Bar Graph and Grouped Bar Graph - DIDN'T DO IT FOR Pie Charts since I wasn't sure if we still want the text or no.
- Add tooltips for Bar Graph + Grouped Bar Graph + Pie Chart

NOTE: weird tooltip position with PieChart, might be related to other tooltip bugs we have

Used this approach for the PieChart: https://codesandbox.io/s/mjp8lmvop?expanddevtools=1
The only approach that worked with the PieChart required to have the PieSlice code within the PieChart component.

Improvement we can make:
- For the Pie Chart, we could display the percentage and the number of answers in the tooltip to provide more context.
- For the Pie Chart, we could also display label in tooltip.

Co-authored-by: e26chiu <e26chiu@csc.uwaterloo.ca>
Reviewed-on: #112
Reviewed-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca>
2022-12-21 16:23:32 -05:00
Mark Chiu 6779486aac Fix GroupBarGraph component (Closes #104) (#108)
continuous-integration/drone/push Build is passing Details
Changes are very similar to the ones made in this PR: #107

This must be merged before Intimacy and Drugs page is merged.

Co-authored-by: e26chiu <e26chiu@csc.uwaterloo.ca>
Reviewed-on: #108
Reviewed-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca>
2022-12-15 08:33:58 -05:00
Amy Wang 4458dcfa1f Add Grouped Bar Graph (#65)
continuous-integration/drone/push Build is passing Details
Closes #2

Notes:
- Named the component the GroupedBarGraph since it can support bar groups of > 2 bars.
- The horizontal graph is mostly a copy of the vertical graph, with slight modifications. This ended up being the ~~laziest~~ easiest way to implement it.

Reviewed-on: #65
Reviewed-by: Shahan Nedadahandeh <snedadah@csclub.uwaterloo.ca>
2022-10-02 13:11:42 -04:00