CodingTrain / CodingTrain/Suggestion-Box

8.15 drag and drop csv to extract table

オープン
#736 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。