Nivo: Bar Graph with Area

Created on 17 Nov 2020  路  5Comments  路  Source: plouc/nivo

Hey guys, how are you?
I need to give some alternatives to our designer, he drew this bar graph with an area indicating the percentage

screencapture-figma-file-rTxGTuBTmQbs1ttpIt3s3V-Dashboard-2020-11-17-10_39_53

I thought about exporting the Areas component in the line package, what do you think?
Because I don't know if this type of graph makes sense, or if so, I can try to implement it directly in the bar graph.

bar question

All 5 comments

You could achieve this with a custom layer passed to the Bar chart.

Yes, but I saw an Areas component in the @nivo/line that could be reused here in this case, I just need it to be exported. makes sense? can I submit a PR?

I'm not sure if we want to be exporting internal components like that, @plouc?

I'm also not sure how helpful it would be to you given your requirements. It will draw the area under the lines for data you give it, which will be different than what you pass to the Bar chart. Given where the areas are drawn in related to your bars, I think it would be more work to reuse than component than to draw the paths manually.

okay, i will make a custom layer, if this is interesting let me know i can put it in the @nivo/bar package! Thanks @wyze!

@sfiorotti I ran across this example which was helpful to me:
https://codesandbox.io/s/m4ro13jjn8

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dubzzz picture dubzzz  路  3Comments

stahlmanDesign picture stahlmanDesign  路  3Comments

pratikguru picture pratikguru  路  3Comments

vagnervst picture vagnervst  路  4Comments

p45mark picture p45mark  路  3Comments