heavysixer / d4

A friendly reusable charts DSL for D3
MIT License
433 stars 46 forks source link

Legend #12

Open Timopheym opened 10 years ago

Timopheym commented 10 years ago

A lot of Chart's libraries have Legend's. D4 is very light and tricky, but may be it's a good idea to have a feature with a legend that can be mixed in, when it needed? screen shot 2014-05-12 at 8 42 40 pm

heavysixer commented 10 years ago

+1

jefffriesen commented 10 years ago

+1 I was just looking to see if this legend was a mixin but didn't find it. It's nice and simple:

screen shot 2014-05-18 at 12 13 27 pm

heavysixer commented 10 years ago

The tricky things with dynamically generated charts is that their legends are of course bound to the data series as well. This means that for charts which involve nesting through keys e.g. stacked or grouped the legend must be run through a parser too. If you know that they structure of the data then you can create a manual legend like the example @jefffriesen is referencing. I will update the example site with a dynamically created legend until we can figure out what a feature would entail.