kbychkov / dailychart

Tiny SVG charting library to display stock sparklines
https://kbychkov.github.io/dailychart/
MIT License
44 stars 8 forks source link

Multiple charts using document.getelementsbyclassname #6

Closed kritsky closed 5 years ago

kritsky commented 5 years ago

I was trying this: new Dailychart(document.getelementsbyclassname('chart'), {

But i've got the error:

Uncaught TypeError: t.getAttribute is not a function

How to do that? Thanks

kbychkov commented 5 years ago

Hello! The constructor doesn't accept an array at the moment. You could use a for loop to initialize every element. It would be a good feature for the next release though. Thanks for the hint.

kritsky commented 5 years ago

Thanks