jiahuang / d3-timeline

Simple JS timeline plugin for d3
1.04k stars 281 forks source link

Data driven bar colors #14

Closed geordie closed 11 years ago

geordie commented 11 years ago

Provided a way for bar colors to be set from data by passing in a D3 color scale with a domain and range and adding a color property to the timeline object that maps data item property values to the color scale's domain.

Also documented and provided an example.

jiahuang commented 11 years ago

Thanks for the feature! I pulled it into a feature branch, broke out some code to make it easier to read and merged it into master.