Skip to content
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

fix: bar chart selection #497

Open
wants to merge 116 commits into
base: develop
Choose a base branch
from
Open

Conversation

dv-usama-ansari
Copy link
Contributor

Follow up of #438

Developer Checklist (Definition of Done)

Issue

  • All acceptance criteria from the issue are met
  • Tested in latest Chrome/Firefox

UI/UX/Vis

  • Requires UI/UX/Vis review
    • Reviewer(s) are notified @thinkh @dvmoritzschoefl
    • Review has occurred (link to notes)
    • Feedback is included in this PR
    • Reviewer(s) approve of concept and design

Code

  • Branch is up-to-date with the branch to be merged with, i.e., develop
  • Code is cleaned up and formatted
  • Unit tests are written (frontend/backend if applicable)
  • Integration tests are written (if applicable)

PR

  • Descriptive title for this pull request is provided (will be used for release notes later)
  • Reviewer and assignees are defined
  • Add type label (e.g., bug, feature) to this pull request
  • Add release label (e.g., release: minor) to this PR following semver
  • The PR is connected to the corresponding issue (via Closes #...)
  • Summary of changes is written

Summary of changes

  • Fix bar plot selection

Screenshots

  • TBD

Additional notes for the reviewer(s)

  • N/A

thinkh and others added 30 commits July 18, 2024 18:14
- make group value default
- harmonize bar width/height
(cherry picked from commit 8e4a0ea)
Fixes datavisyn/communication_xaira_ordino#26

The ReactECharts component will check the resize of the parent element and update accordingly
* fix: make resizing work for facets

* feat: add a loading overlay when the viewport resizes

* fix: scroll flickering

* fix: remove pos relative

* chore: remove unnecessary overflow hidden

* chore: address PR review

* fix: storybook error
* feat: add sorting controls
wip: add sorting for y axis
wip: add property in config to preload sorting
wip: use in reprovisyn

* feat: improvements in sorting

* feat: handle categorical column change

* feat: implement initial sorting

* feat: move sort into the header

* fix: sort for normalized mode

* chore: sort facets by name

* fix: add null check for sortState

* fix: add null checks for sort button

* fix: fallback value

* fix: remove circular dependency

* fix: address PR feedback

* chore: use color for unknown values

* fix: storybook error
…olcano (#486)

* feat: add sorting controls
wip: add sorting for y axis
wip: add property in config to preload sorting
wip: use in reprovisyn

* feat: improvements in sorting

* feat: handle categorical column change

* feat: implement initial sorting

* feat: move sort into the header

* fix: sort for normalized mode

* chore: sort facets by name

* fix: add null check for sortState

* fix: add null checks for sort button

* fix: fallback value

* fix: remove circular dependency

* fix: address PR feedback

* chore: use color for unknown values

* fix: storybook error

* fix: overlapping legends in bar chart

* chore: update SingleEChartsBarChart.tsx
…o thinkh/refactor-bar-chart-using-echarts
@thinkh
Copy link
Member

thinkh commented Sep 18, 2024

@dv-usama-ansari Currently open tasks:

  • Bar background color for grouped bars, add the alpha to the hex value #RRGGBBAA instead of #RRGGBB + opacity (see example) -> the numbers on top of the bar should not be transparent because the opacity is not set
  • Global min/max for all facets to calculate the scale for all the echart bar charts
  • Fix selection after global min/max
  • Make category labels on the y-axis wider (e.g., more than just REACTOME_...)
  • Clipped tooltip in view -> set higher z-index for tooltip
  • Sorting of the categorical axis (Daniela's feedback)
  • A single bar chart should use the full height of the container -> add a config flag use full height with default value false (Daniela's feedback)
  • Check if there is a flag margin/padding of the domain -> echarts should do this automatically according to these demos -> agreed with Dominic that we don't need this for now

@dv-usama-ansari
Copy link
Contributor Author

dv-usama-ansari commented Sep 18, 2024

@thinkh
I have addressed all the points mentioned by you in the comment

Make category labels on the y-axis wider (e.g., more than just REACTOME_...)

I made this ☝️ work in a way we would expect to see the truncation in DOM elements. We now have a constant to define the maximum label width in pixels and the component would handle truncated text automatically:

export const AXIS_LABEL_MAX_WIDTH = 72;

As of 3f2337e, I still have to fix the heights of individual charts when the group type is Grouped in Horizontal direction with facets enabled.

I would document this in detail in this PR very soon.

@dv-usama-ansari
Copy link
Contributor Author

It was a tricky implementation but according to 13b22fc, the bar plot labels are now responsive like we saw in the PowerBI dashboard

responsive-labels-bar-plot.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants