In the horizontal bar, when creating rectangle band for each domain input, the x value for all rectangle is zero. As all the rectangle starting at same x that is zero with varying value in the y-axis.
When compare rectangle value between horizontal and vertical we can see in code below
Note: While applying attribute value for width and y-axis, we have to wrap these value with scale value of x and y.
Important function to note
- Scale value for x and y
- Axix value for x and y
Add the following code in horizontal-bar.html
Add the following code in sales.csv