I found out that if you set canvasClass to a class you're using elsewhere on the page then the method used to get a reference to the canvas element fails. Removing the element using the same class or changing the canvasClass to something else fixes the issue, but this is not ideal in case you want tu actually reuse the same class for various parts of the page.
Might open a PR to fix this.

This was originally a comment on #18 but I think it is actually a separate issue.