Heatmap requires start index on range
mccalluc opened this issue · 1 comments
mccalluc commented
- web_bundle version: v0.0.1
- browser version: FF 42.01 and Chrome 52.0.2743.116
- OS: Mac
Reproducer:
function demo_5($target) {
function print(string) {
$target.append(string + '<br>');
}
function parse_and_print(range_def) {
var range = Caleydo.core.range.parse(range_def);
print(range_def + ' -> ' + range);
return range;
}
var sequence = Array.from(Array(3).keys());
var matrix = Caleydo.d3.parser.parseMatrix(
// times table
sequence.map(function (m) {
return sequence.map(function (n) {
return m * n;
})
}),
sequence, // row_ids
sequence // col_ids
);
function dump(range_def) {
var range = parse_and_print(range_def);
Caleydo.core.multiform.create(
matrix.view(range), $target[0], {initialVis: 'caleydo-vis-heatmap'}
);
Caleydo.core.multiform.create(
matrix.view(range), $target[0]
);
print('<hr>');
}
dump('(1:3),(0:3)');
dump('(1:3),(:3)');
}
Observed behavior:
Although the tables are the same, the heatmap can't handle a missing start index.
(Ignore the column headers: That's #120.)
Expected behavior:
If the tables are the same, the heatmap should be the same. (The divergent behavior also suggests there is a missed opportunity for code to be shared between table and heatmap?)
sgratzl commented
moved to phovea/phovea_core#120