interactivethings / d3-grid

D3 grid layout
BSD 3-Clause "New" or "Revised" License
77 stars 11 forks source link

Add functions to expose the x and y scales for external use. #5

Open keithrbennett opened 10 years ago

keithrbennett commented 10 years ago

I'm very new to this stuff, so please educate me if there's a better way.

That said, I found that I wanted to put labels beside the x and y axes, and needed to find out what the correct x and y positions were for a given row or column. It seemed like the best way was to use the same scale object that the grid object was itself using. So I added functions to expose those scales to the outside. Is this reasonable?