adilyalcin / Keshif

Keshif - Data Made Explorable (Prototype)
https://keshif.me
BSD 3-Clause "New" or "Revised" License
457 stars 123 forks source link

Uncaught TypeError: Cannot read property '0' of undefined #179

Closed dawidjk closed 7 years ago

dawidjk commented 7 years ago

Hi there, I am new to Keshif and I ran into an issue that I do not know how to solve. Hopefully someone will be able to help. It seems that I can't load any data into keshif. I tried with the gdrive demo and then from my local machine as well, but to no avail. The error I get is:

keshif.js:1983 Uncaught TypeError: Cannot read property '0' of undefined at kshf.Browser (keshif.js:1983) at HTMLDocument.<anonymous> (analytics-keshif.js:2) at j (jquery.js:3073) at Object.fireWith [as resolveWith] (jquery.js:3185) at Function.ready (jquery.js:3391) at HTMLDocument.I (jquery.js:3407)

and my script is:

$(document).ready( function(){ browser = new kshf.Browser({ domID: "#analyticsDiv", categoryTextWidth: 80, source: { url: "http://localhost:8000/#!/analytics", dirPath: "./data/", fileType: "csv", name: "lendingcalc", id: "Loan ID", }, }); });

with the file being ./data/lendingcalc.csv

I've included the following in my html as well:

<script type="text/javascript" src="https://www.google.com/jsapi" async></script> <script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script> <script type="text/javascript" src="bower_components/d3/d3.min.js" charset="utf-8"></script> <script type="text/javascript" src="bower_components/Keshif/keshif.js" charset="utf-8"></script> <link rel="stylesheet" href="bower_components/Keshif/keshif.css"/ type="text/css"> <link rel="stylesheet" href="bower_components/fontawesome/css/font-awesome.min.css"> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript" src="bower_components/papaparse/papaparse.min.js"></script>

Any help would be greatly appreciated