Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
29
Comments
1
alexl8819
@alexl8819

All comments

  • Youssif•280
    @Youssif94
    Submitted over 2 years ago

    expenses-chart-component-main

    1
    alexl8819•570
    @alexl8819
    Posted over 2 years ago

    Hi,

    In your chart's configuration, there is a section for plugins where you can modify the tooltip. Check out the docs to see what options the tooltip contains and what can be modified. To give you a headstart, I'll show you an option or two off the top of my head that can be changed.

    plugins: {
      tooltip: {
        displayColors: false, // this value removes the colored box next to your value
        callbacks: {
           title: function () { return '' }, // we don't need a title, only the label
           label: function () { 
             // put code here to render the label's desired value 
             return ""
           }
        }
    }
    

    There's more I'd look into (hint: the caret probably isn't needed) to style it closer to the design spec. You may also want to look into the layout property to see how to get the tooltip to appear above the chart. You can check that out here.

    Marked as helpful
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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub