{"id":18876203,"url":"https://github.com/keyvaluesoftwaresystems/react-waterfall-chart","last_synced_at":"2025-04-14T17:31:56.209Z","repository":{"id":154873576,"uuid":"626309352","full_name":"KeyValueSoftwareSystems/react-waterfall-chart","owner":"KeyValueSoftwareSystems","description":"A customizable and responsive svg waterfall chart component","archived":false,"fork":false,"pushed_at":"2024-01-17T09:12:58.000Z","size":3253,"stargazers_count":5,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-01T16:48:07.726Z","etag":null,"topics":["brick-chart","bridge-chart","bridge-graph","chart","custom-charts","flying-brick","flying-bricks-chart","mario-chart","react","react-chart","react-charts","svg-chart","waterfall","waterfall-chart","waterfall-charts"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KeyValueSoftwareSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-11T07:58:30.000Z","updated_at":"2024-02-05T09:05:26.000Z","dependencies_parsed_at":"2023-11-20T08:04:49.269Z","dependency_job_id":"bbab22ec-4dbc-48f9-8b24-fe670b751703","html_url":"https://github.com/KeyValueSoftwareSystems/react-waterfall-chart","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyValueSoftwareSystems%2Freact-waterfall-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyValueSoftwareSystems%2Freact-waterfall-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyValueSoftwareSystems%2Freact-waterfall-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyValueSoftwareSystems%2Freact-waterfall-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeyValueSoftwareSystems","download_url":"https://codeload.github.com/KeyValueSoftwareSystems/react-waterfall-chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639328,"owners_count":17177816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brick-chart","bridge-chart","bridge-graph","chart","custom-charts","flying-brick","flying-bricks-chart","mario-chart","react","react-chart","react-charts","svg-chart","waterfall","waterfall-chart","waterfall-charts"],"created_at":"2024-11-08T06:11:39.997Z","updated_at":"2024-11-08T06:11:40.467Z","avatar_url":"https://github.com/KeyValueSoftwareSystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Waterfall Chart\n\n  \n\n\u003ca  href=\"https://www.npmjs.com/package/@keyvaluesystems/react-waterfall-chart\"\u003e\u003cimg  src=\"https://badgen.net/npm/v/@keyvaluesystems/react-waterfall-chart?color=blue\"  alt=\"npm version\"\u003e\u003c/a\u003e  \u003ca  href=\"https://www.npmjs.com/package/@keyvaluesystems/react-waterfall-chart\"  \u003e\u003cimg  src=\"https://img.shields.io/npm/dw/@keyvaluesystems/react-waterfall-chart?label=Downloads\"  /\u003e\u003c/a\u003e  \u003ca  href=\"https://github.com/KeyValueSoftwareSystems/react-waterfall-chart\"\u003e\u003cimg  src=\"https://github.com/KeyValueSoftwareSystems/react-waterfall-chart/actions/workflows/deploy.yml/badge.svg\"  alt=\"\"  /\u003e\u003c/a\u003e\n\n  \n\n\u003cdiv  align=\"center\"\u003e\n\u003cimg  src=\"./src/assets/waterfall-chart-example.png\"  alt=\"\"  width=\"784\"  height=\"414\"/\u003e\n\u003c/div\u003e\n\n  \n\n\u003eA customizable \u0026 responsive Waterfall chart for React project\n\n  \n\nTry tweaking a waterfall chart using this codesandbox link \u003ca  href=\"https://codesandbox.io/s/waterfall-chart-example-uvr8jd\"\u003ehere\u003c/a\u003e\n\n  \n\n## Installation\n\n  \n\nThe easiest way to use react-waterfall-chart is to install it from npm and build it into your app with Webpack.\n\n  \n\n```bash\n\nnpm install  @keyvaluesystems/react-waterfall-chart\n\n```\n\nYou’ll need to install React separately since it isn't included in the package.  \n\n## Usage\n\nReact Waterfall chart can run in a very basic mode by just providing the `transactions` like given below:\n\n  \n\n```jsx\n\nimport  WaterfallChart  from  '@keyvaluesystems/react-waterfall-chart';\n\n\u003cWaterfallChart\n  transactions={transactionList}\n/\u003e\n\n```\n\n  \n\nThe transactions prop is an array of transactions with the following keys:\n\n  \n\n-  `label` - a string to represent each transaction\n\n-  `value` - a number that specifies the transaction quantity\n\nAn example for transactions array is shown below:\n\n  \n\n```jsx\nconst  transactionsList = [{\n    label:  'Quarter 1, 2020',\n    value:  1000\n  },{\n    label:  'Quarter 2, 2020',\n    value:  -500\n  }];\n```\n\nYou can use `barWidth` prop to specify the width of each bar present in the chart. The given value will be converted to pixels (px) and applied to the chart.\nWith the help of `showBridgeLines` prop, the line connecting the adjacent bars can be shown/hidden.\n`showFinalSummary` can be used to display the summary as the last transaction.\n \n```jsx\n\u003cWaterfallChart\n  transactions={transactionsList}\n  barWidth={100}\n  showBridgeLines={true}\n  showFinalSummary={false}\n/\u003e\n```\n\n  \n\nYou can specify whether to show or hide the scale lines in the Y axis with the help of `showYAxisScaleLines` prop.\n\n```jsx\n\u003cWaterfallChart\n  transactions={transactionsList}\n  showYAxisScaleLines={true}\n/\u003e\n```\n## Props\n\n  Props that can be passed to the component are listed below:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eProp\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eDefault\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003etransactions:\u003c/b\u003e object[]\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nAn array of transaction objects to specifying the value and label\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e[]\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003ebarWidth?:\u003c/b\u003e number\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nA number to specify the width of each bars shown in the chart\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003eshowBridgeLines?:\u003c/b\u003e number\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nA boolean value to specify whether to show the connecting line between adjacent bars\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003eshowYAxisScaleLines?:\u003c/b\u003e boolean\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nThe boolean value to control the display of scale lines in y axis\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003eyAxisPixelsPerUnit?:\u003c/b\u003e number\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nThe distance between each y axis scale unit. The value specified will be applied as pixels.\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e0\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003eshowFinalSummary?:\u003c/b\u003e boolean\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nThe boolean value to control the display of summary section. The summary will be displayed as the last transaction\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003esummaryXLabel?:\u003c/b\u003e string\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nThe x axis label to be shown for the summary section.\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eSummary\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003eonChartClick?:\u003c/b\u003e function\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nThe callback function which will be triggered on clicking the bars in the waterfall chart. The current bar element will be passed as the prop in the function\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eundefined\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e\u003cb\u003estyles?:\u003c/b\u003e object\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003e\nProvides you with a bunch of callback functions to override the default styles.\n\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003eundefined\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Style Customizations\n\n\nAll the default styles provided by this package are overridable using the `style` prop.\nthe below code shows all the overridable styles:\n\n```jsx\n\u003cWaterfallChart\n transactions={transactionsList}\n showYAxisScaleLines={true}\n styles={{\n  summaryBar: CSSProperties,\n  positiveBar: CSSProperties,\n  negativeBar: CSSProperties\n }}\n/\u003e\n```\n-  `summaryBar` - overrides the summary bar styles\n-  `positiveBar` - overrides the positive value bar styles\n-  `negativeBar` - overrides the negative value bar styles\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyvaluesoftwaresystems%2Freact-waterfall-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeyvaluesoftwaresystems%2Freact-waterfall-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyvaluesoftwaresystems%2Freact-waterfall-chart/lists"}