Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

morris.js Graph container element not found

Why am I getting an exception

Uncaught Error: Graph container element not found

when using morris.js?

like image 269
Gene Bo Avatar asked Aug 11 '13 21:08

Gene Bo


2 Answers

Solution: Put the javascript after the morris.js div

From this post from tiraeth: https://github.com/morrisjs/morris.js/issues/137

like image 113
Gene Bo Avatar answered Sep 18 '22 23:09

Gene Bo


if don' t use the chart on this page, you can do this:

  1. Go to the line where the exception is throwed in morris.js
  2. change it like this: before:

      if (this.el === null || this.el.length === 0) {    return;     // throw new Error("Graph placeholder not found.");   }  
like image 43
Anatole Nkwadjo Avatar answered Sep 20 '22 23:09

Anatole Nkwadjo