Skip to content
Advertisement

React with Svg vertical stacked barchart (no third party library)

I have below piece of code. I am using React and svg for bar charts. I am not using any third party library for charts. With this below piece of code, i am able to get the bar charts. But the issue is that my bar charts show horizontally, I want to show it vertically. I am not able to figure out how to get this same piece of code working for a vertical bar chart.

I saw one video online https://egghead.io/lessons/javascript-build-a-bar-chart-with-svg-from-scratch-with-react This guy is able to achieve the bar chart vertically. I am not sure where i am going wrong in displaying it. Any changes i do or try, it always show horizontal bar chart.

JavaScript

Can someone please help me figure out where i went wrong.

Advertisement

Answer

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement