Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

first dimension determines both column and row headers? #11

Open
mccalluc opened this issue Dec 1, 2016 · 1 comment
Open

first dimension determines both column and row headers? #11

mccalluc opened this issue Dec 1, 2016 · 1 comment
Labels
type: bug Something isn't working

Comments

@mccalluc
Copy link
Contributor

mccalluc commented Dec 1, 2016

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

Merged PR which adds tests, but does not fix the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant