Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C covid19india-react
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • covid19india
  • covid19india-react
  • Merge requests
  • !201

Dynamically rerender trend charts change in window size [WIP]

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/shuklaayush/feature/svg-resize into master Mar 26, 2020
  • Overview 1
  • Commits 13
  • Pipelines 0
  • Changes 2

Created by: shuklaayush

Contains a lot of changes at once. Feel free to cherry-pick.

  • Added a handler which re-renders charts on change in window resize. Trend charts have a fixed aspect ratio which restricts them from scaling properly on different devices when the window size is changed.*
  • Delete a lot of duplicate code by vectorizing all charting functions
  • Also switched to stem plots which serve a somewhat similar purpose as bar graph (#189 (closed)). Fixes #200 (closed).

*Note: Ideally, the re-render should be triggered only when the specified chart area changes and not the whole window. This can be done using something like resizeObserver, but this API is not supported on all browsers. Reverted since it's causing performance issues. Manual page refresh required now.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/shuklaayush/feature/svg-resize