I want to make a D3 bar chart using D3 v5. I can't seem to find this solution anywhere. I want the bar height to be based on an object - that can dynamically change - rather than the an array in which D3 bar charts are normally based off of. I have been able to append both axes with the proper data to an SVG but I cannot figure out how to append the bars to the SVG using the object.
For example, my object is
let Obj = {
red: 102,
orange: 168,
blue: 154,
pink: 197
}
For my Axes, the y-axis is 0 to 200 (using D3.nice()) and the x-axis is red, orange, blue, pink.
Any suggestions on how to append the bars appropriately?