CSNW / d3.compose

Compose complex, data-driven visualizations from reusable charts and components with d3
http://CSNW.github.io/d3.compose/
MIT License
697 stars 24 forks source link

Enable dynamic label position #33

Closed timhall closed 9 years ago

timhall commented 9 years ago

Allows top|bottom label position as well as "di" function for additional customization.

(a)|(b): a for y-value >= 0 and b otherwise, where a and b are top, right, bottom, or left

function(d, i) { return d.x >= 0 ? 'right' : 'left'; }