我有以下代碼來獲取CSV,將其轉換爲字符串並傳遞給我的ejs。這工作。 CSV具有第一行(標題)X,Y,時間和隨後行中的數字。我真正需要的是能夠獲取每個參數(X,Y,時間)的值並使用它們繪製圖形。我該怎麼做呢? d3.csv("http://vhost11.lnu.se:20090/assig2/data1.csv", function (data) {
var data1 = data
我有一個函數,其中包含一個對象數組,並且希望將它們與.esj/.htlm頁面(儘管我假設爲數據變量)一起使用。這是我的,不知道如何去做這個,謝謝! app.get('/', (req, res) => {
// want to get the data in here
res.render('index', data);
})