grafico icon indicating copy to clipboard operation
grafico copied to clipboard

Enhanced version of sprucegum's legend feature for line charts

Open luebbert42 opened this issue 13 years ago • 2 comments

Hi,

I needed this feature as well, but figured out that there is an issue with longer titles (they were not positioned correctly each under another, so I fixed this (*)).

I also moved the drawLegend function to the linechart class and added an option to set the text for the legend. Legends are off by default.

How can I use this feature? enable the legend with: drawlegend: true, legend_title: "My Legend", // fallback is "Legend: "

Regards Dorthe

(*) Pls be patient with me, this is my first pull request on github, I hope I did everything in a correct way, it's a bit spooky ;-)

luebbert42 avatar Aug 09 '11 09:08 luebbert42

Hi Luebbert42! Cool! I'm quite busy right now so it might be a couple of days before I can look into this, but I'll get around to it :)

Kilian avatar Aug 11 '11 09:08 Kilian

Hi Kilian,

most probably I will modify this feature again (I need an option to set the legend in another corner of the chart). I'll keep you up to date.

Dorthe

luebbert42 avatar Aug 11 '11 14:08 luebbert42