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.