Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/jasmine/tests/heatmap_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ describe('heatmap calc', function() {
expect(out.y).toBeCloseToArray([-0.5, 0.5, 1.5]);
expect(out.z).toBeCloseTo2DArray([[1, 2, 3], [3, 1, 2]]);
});

it('should handle the category case', function() {
var out = _calc({
x: ['a', 'b', 'c'],
y: ['z'],
z: [[17, 18, 19]]
});

expect(out.x).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]);
expect(out.y).toBeCloseToArray([-0.5, 0.5]);
expect(out.z).toBeCloseTo2DArray([[17, 18, 19]]);
});
});

describe('heatmap plot', function() {
Expand Down