CodingTrain / CodingTrain/Suggestion-Box
8.15 drag and drop csv to extract table
- 主要言語
- 言語のデータがありません
- スター
- 570
- フォーク
- 85
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi Daniel,
I've been watching your p5.js tutorial series. It's excellent. Thank you!
I'm trying to combine the dropzone you demonstrate in 8.15 with the tabular data functionality shown in 13.5. I'm stuck so I came here to see if anyone else is having the same issue. I can't find any threads with the same question though.
I am having a problem as the table I get from the file is showing an empty array in the console:
_p5.Table {columns: Array(0), rows: Array(0)}
columns
:
(2) ["Destination", "Price"]
rows
:
(2421) [p5.TableRow, p5.TableRow …]
__proto__
:
Object_
_undefined_
This means I cannot access the data. Everything just returns undefined. How can I fix this so that the array shows {columns: Array(2), rows: Array(2421)} as expected?
My code:
function gotFile(myfile){
vox2 = loadTable(myfile.data,"csv", "header");
console.log(vox2);
console.log(vox2[0]);
}
Any help you can offer would be very much appreciated.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、チュートリアル 8.15 の dropzone の例、13.5 の table の例、および提供された gotFile コードを使って、報告された loadTable の動作を再現します。p5.Table オブジェクトと CSV の読み込み経路を比較します。原因が確認され、修正内容が文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data, web-dev
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100