Skip to content

About

📈 budget-view-chart is a React Chart component specialising in display budget for personal finance.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

62 Commits

Folders and files

Repository files navigation

budget-view-chart

Deploy Github Page

npm type definitions NPM npm npm

Buy Me A Coffee

A react Chart component specialising in display budget for personal finance.

This component is built based on echarts.

Demo Button Icon

example

Get Started

npm install budget-view-chart
<BudgetChart config={{
  showMonthEndLine: null,
  showAggregate: false,
  locale: 'en-GB',
  currency: 'GBP',
  theme: 'auto',
  themeColors: {
    light: {
      background: '#ffffff',
      text: '#263238',
      colorPalette: ['#edae49', '#d1495b', '#00798c']
    },
    dark: {
      background: '#111827',
      text: '#f9fafb',
      colorPalette: ['#ffd166', '#ef476f', '#06d6a0']
    }
  }
}} value={dataset}/>

Example dataset can be find in demo/src/data/

theme can be 'light', 'dark', or 'auto'. It defaults to 'auto', which follows the system color scheme and updates when that scheme changes. themeColors lets you override colors for either mode. Each mode can set background, text, axis, splitLine, legend, legendText, legendHighlightText, line, tooltipBackground, tooltipBorder, tooltipText, and colorPalette. Unset colors use the built-in theme. The default background is transparent, so set the container background to match the theme unless you provide background. Each mode's colorPalette sets the budget item colors in order. Colors repeat when there are more budget items than colors. If you omit a palette or pass an empty array, that mode uses the built-in palette.

To run the demo with live changes to the library source, use Yarn 1:

yarn install
cd demo
yarn install
yarn start

Visualisation

Breakdown View

example1

Highlight on Budget Item

example2

Highlight on Spending in a Whole Month

example3

Highlight on Spending

example4

Negative Spending (Income)

example5

Aggregate View

example6

Over Spending

example7

Current Line

example8

Contribution

All contributions are welcomed, especially the following aspects:

  • Standardise the repo
  • Standardise the build/test/linting process
  • Support custom styling
  • Performance improvements

About

📈 budget-view-chart is a React Chart component specialising in display budget for personal finance.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages