Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

range view of table: first dimension determines both column and row headers? #120

Closed
mccalluc opened this issue Sep 12, 2016 · 1 comment
Labels

Comments

@mccalluc
Copy link
Contributor

function demo_5($target) {
  var matrix = Caleydo.d3.parser.parseMatrix(
      [ // times table
        [0, 0, 0, 0],
        [0, 1, 2, 3],
        [0, 2, 4, 6],
        [0, 3, 6, 9]
      ],
      [0, 1, 2, 3], // row_ids
      ['A', 'B', 'C', 'D'] // col_ids
  );

  var inner_range_row = Caleydo.core.range.parse([[1],[0,1,2]]);
  var inner_matrix_row = matrix.view(inner_range_row);
  Caleydo.core.multiform.create(inner_matrix_row, $target[0]);

  /*
    ID  B
    1   0   1   2

    expected

    ID  B   C   D
    1   0   1   2  
   */

  var inner_range_col = Caleydo.core.range.parse([[0,1,2],[1]]);
  var inner_matrix_col = matrix.view(inner_range_b);
  Caleydo.core.multiform.create(inner_matrix_col, $target[0]);

  /*
    ID  A   B   C
    0   0
    1   1
    2   2

    expected

    ID  A
    0   0
    1   1
    2   2   
   */
}
@mccalluc
Copy link
Contributor Author

mccalluc commented Dec 1, 2016

replaced by phovea/phovea_vis#11

@mccalluc mccalluc closed this as completed Dec 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants