I’m using JA Google Charts and wanted to point it to a file on my server instead of manually copying in the data.
I discovered that, if the file ends with a newline (for example, if I edit the file and save it), the data that gets passed to the JavaScript ends with [“”] (a one-element array) and the chart doesn’t get drawn. If the file doesn’t end with a newline, all is well.
I can create the same problem if I enter the data by hand into the “data input” field in the module and end with an extra blank line.
Can you make the module ignore blank lines? This change should do it:
@@ -43,9 +43,7 @@
}
}
}
- if (count($tmp)>1) {
- $data[] = $tmp;
- }
+ $data[] = $tmp;
}
if(count($data))
Thanks!