CodeYellowBV / chartist-plugin-legend

Legend plugin for Chartist.js.
https://codeyellowbv.github.io/chartist-plugin-legend/
Other
116 stars 62 forks source link

Multiple charts, only one legend #33

Closed sambengtson closed 7 years ago

sambengtson commented 7 years ago

I'm experiencing an issue that was reported on the Gitlab Repo

If I have multiple charts with legends on a single page using id's to select them, it seems that the last chart is the only one that gets a legend generated. It does not seem to matter what type of chart I use. I can give a reproducible example if necessary.

capture

SpaceK33z commented 7 years ago

Yes, I'd like a reproducible example. On the example page you can see that this works. However, do note that I don't use this package myself much anymore, so please consider sending a PR with the fix (and a test).

PS: the GitLab repo was for demoing purposes, you can also find that issue here: https://github.com/CodeYellowBV/chartist-plugin-legend/issues/17.

sambengtson commented 7 years ago

Seems that I was using a pretty old version of the lib from a bower install. Everything appears to be good now.

I'll keep my eye open for other issues and will submit PRs as necessary. I plan on using this for the foreseeable future. Thanks!

GabrielSiq commented 7 years ago

I had a similar problem, also due to the version installed through bower being old.