Nivo: Waterfall chart

Created on 28 Jun 2019  路  7Comments  路  Source: plouc/nivo

Is there a way to modify the bar chart to make it behave like a waterfall chart? If not, is this chart on the roadmap?

Most helpful comment

You cannot use the bar chart to make a waterfall chart, I'm planning to add one, but I've no idea when I'll be able to do so

All 7 comments

You cannot use the bar chart to make a waterfall chart, I'm planning to add one, but I've no idea when I'll be able to do so

Thanks for the clarification, also, thanks for the amazing library!

Hi, I was wondering if there were any updates regarding the waterfall charts ?

Just wondering, if waterfall charts will be available sometime this year. Thanks for this wonderful library!

Also if we can make combination charts using nivo, it will become the ultimate charting library!

Any update on this?

Any update on this please?

For anyone interested, I was able to customize the bar chart to make a waterfall:
image

See the code here: https://gist.github.com/mdesousa/94260b6596be1d12664a6a0fe92d76ed
You need to pass data like this:

const data = [
  { category: "Start Balance", amount: 500 },
  { category: "Deposits", amount: 200 },
  { category: "Withdrawals", amount: -100 },
  { category: "Fees", amount: -20 },
];

There is one constraint to this approach: it does not work well when the sign of the balance changes through the chart. For example, if you start with a negative balance and have sufficient deposits to make it positive. As long as the balance keeps the same sign (either negative or positive) through the chart, it works well.

Hope this helps!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PattieC4ke picture PattieC4ke  路  3Comments

zhe1ka picture zhe1ka  路  3Comments

indvstry picture indvstry  路  3Comments

Haaziq-Uvais picture Haaziq-Uvais  路  3Comments

danpettay picture danpettay  路  3Comments