Open Timopheym opened 10 years ago
+1
+1 I was just looking to see if this legend was a mixin but didn't find it. It's nice and simple:
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.
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?