Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

React and Tailwind, chart made by using chartjs and react-chartjs-2

react, tailwind-css, chart-js
Hsienz•550
@Hsienz
A solution to the Expenses chart component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is the first time I using chartjs and react-chart-js. There are a problem that the chart would not be responsive if I set maintainAspectRatio to true. So currently I set maintainAspectRatio to false, but its height look too short. Does someone know how to solve this problem?


Upate: I solved this problem by moving <Chart> outside of <div>

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Hsienz's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License