java - dygraph error - this.rawData_ is undefined -
i using dygraph generate graph using csv file , getting below error @ firebug.
typeerror: this.rawdata_ undefined
i investigated issue , found csv not being loaded entirely , label formatting being done. hence have used drawcallback.
graph_obj_2 = new dygraph( document.getelementbyid("graphdiv2"), "http://localhost:8080/report_2.csv", // path csv file { //options legend: 'always', animatedzooms: true, drawcallback: function(g, is_initial) { if (!is_initial) { return;} }, axes: { x: { valueformatter: function(x) { var label; switch (x){ case 1: label = '0'; break; case 2: label = '1'; break; case 3: label = '2'; break; case 4: label = '3'; break; }return label; }, axislabelformatter: function(x) { var label; switch (x){ case 1: label = '0'; break; case 2: label = '1'; break; case 3: label = '2'; break; case 4: label = '3'; break; }return label; }, } } });
please me fix error. please note error if using csv file(not inline data) , labels of choice.
please consider parentheses has been closed properly.
Comments
Post a Comment