I have a bargraph that can have dynamic values for it's y-axis labels. Using
http://bl.ocks.org/mbostock/3019563 (Margin Conventions) as an example for how I am currently setting margins, I cannot figure out how to make the left margin flexible, so it will fit the variable length y-axis labels and get everything to scale accordingly. The requirement is to have the labels horizontal with no transformations, so the only way I can find to do this is to initially set the margins, draw the y-axis first, take a measurement of its width, then reset my svg width/height and linear and ordinal scales and draw everything else.
Seems like there should be an easier way and I am just missing something simple. I also apologize if this a repost, the first post crashed the browser and I don't see it on the list.
Cheers