From 5f15f31e311b2da87a3ffc2d77e1365273fd8f92 Mon Sep 17 00:00:00 2001 From: Roderick Date: Thu, 17 Oct 2024 20:53:53 -0700 Subject: [PATCH] Fix example page bug where data is not displayed --- entab-js/example/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/entab-js/example/app.js b/entab-js/example/app.js index 408a20c..202bcac 100644 --- a/entab-js/example/app.js +++ b/entab-js/example/app.js @@ -562,21 +562,21 @@ async function calculateBounds(reader) { const columns = []; let nPoints = 0; for (const column of reader.headers) { - const value = datum[column]; + const value = datum.get(column); // TODO: handle dates, booleans? if (typeof value === "string") { - bounds[`length(${column})`] = [v => v[column].length, value.length, value.length]; + bounds[`length(${column})`] = [v => v.get(column).length, value.length, value.length]; columns.push(`length(${column})`); if (column === "sequence") { - bounds[`gc(${column})`] = [v => FUNCTIONS.gc(v[column]), FUNCTIONS.gc(value), FUNCTIONS.gc(value)]; + bounds[`gc(${column})`] = [v => FUNCTIONS.gc(v.get(column)), FUNCTIONS.gc(value), FUNCTIONS.gc(value)]; columns.push(`gc(${column})`); } else if (column === "quality") { - bounds[`average(quality)`] = [v => FUNCTIONS.avgQual(v[column]), FUNCTIONS.avgQual(value), FUNCTIONS.avgQual(value)]; + bounds[`average(quality)`] = [v => FUNCTIONS.avgQual(v.get(column)), FUNCTIONS.avgQual(value), FUNCTIONS.avgQual(value)]; columns.push(`average(quality)`); } } else { // it's a number - bounds[column] = [v => v[column], value, value]; + bounds[column] = [v => v.get(column), value, value]; columns.push(column); } }