table.js#

static afqb.table.buildTable(error, useless, data)#

Initialize Table from subject metadata in subjects.csv. Subject rows maintain their order from subjects.csv.

Arguments:
  • error – Passed to prevent execution in case error occurs in preceding functions.

  • useless – Obligatory callback argument that we don’t use in the function.

  • data (object) – JavaScript array created by d3.csv(data/subjects.csv).

static afqb.table.refreshTable()#

Refresh the Table after sort operations. Subject rows are rearranged in ascending or descending order and colored by group. Number of groups is determined by the user specified value in the Table gui (default = 2). Selection is retained on refresh.

static afqb.table.ascendingWithNull(a, b)#

Sort rows in ascending order. Elements a and b are sorted with d3.ascending, and their associated rows are similarly ordered.

Arguments:
  • a (element) – value in sorting column for the first object

  • b (element) – value in sorting column for the second object

static afqb.table.descendingWithNull(a, b)#

Sort rows in descending order. Elements a and b are sorted with d3.descending, and their associated rows are similarly ordered.

Arguments:
  • a (element) – value in sorting column for the first object

  • b (element) – value in sorting column for the second object

static afqb.table.rowSelect()#

Select subject by row. Change opacity of row and corresponding subject lines in 2D plots.

static afqb.table.tableMouseDown()#

Define subject selection and deselection by drag.