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

Using the treeshakable api for echarts #6424

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

Omkar76
Copy link
Contributor

@Omkar76 Omkar76 commented Oct 9, 2023

WHAT

🤖 Generated by Copilot at d7840ee

The pull request improves the performance and organization of the line plot components used in the consultations page. It uses ReactEchartsCore instead of echarts-for-react and combines LinePlot and StackedLinePlot in the same file.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers @sainak

Before optimization
image

After Optimization
image

HOW

🤖 Generated by Copilot at d7840ee

  • Reduce bundle size and improve performance of line plot components by importing custom echarts modules instead of echarts-for-react wrapper (link, link)
  • Use ReactEchartsCore component instead of ReactECharts component to render the line plots with the custom echarts instance (link, link)
  • Consolidate the code for the line plot components by moving the StackedLinePlot component from StackedLinePlot.tsx to LinePlot.tsx (link)

@Omkar76 Omkar76 requested a review from a team October 9, 2023 10:50
@Omkar76 Omkar76 requested a review from a team as a code owner October 9, 2023 10:50
@vercel
Copy link

vercel bot commented Oct 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 9, 2023 10:51am

@netlify
Copy link

netlify bot commented Oct 9, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit d7840ee
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6523daf4e5186500083671c4
😎 Deploy Preview https://deploy-preview-6424--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@khavinshankar
Copy link
Member

@nihal467 the changes looks good, just give it a general test of all the graphs

@khavinshankar khavinshankar added the reviewed reviewed by a core member label Oct 10, 2023
@nihal467
Copy link
Member

LGTM

@khavinshankar khavinshankar merged commit 32c25aa into coronasafe:develop Oct 11, 2023
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewed reviewed by a core member tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove or replace echarts currently using 2.8Mb
4 participants