We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4434fad commit 0fafe14Copy full SHA for 0fafe14
test/jasmine/tests/heatmap_test.js
@@ -428,6 +428,28 @@ describe('heatmap calc', function() {
428
expect(out._xcategories).toEqual(['a', 'b', 'c']);
429
expect(out._ycategories).toEqual(['A', 'B', 'C']);
430
});
431
+
432
+ it('should handle the date x/y/z/ column case', function() {
433
+ var out = _calc({
434
+ x: [
435
+ '2016-01-01', '2016-01-01', '2016-01-01',
436
+ '2017-01-01', '2017-01-01', '2017-01-01',
437
+ '2017-06-01', '2017-06-01', '2017-06-01'
438
+ ],
439
+ y: [0, 1, 2, 0, 1, 2, 0, 1, 2],
440
+ z: [0, 50, 100, 50, 0, 255, 100, 510, 1010]
441
+ });
442
443
+ expect(out.x).toBeCloseToArray([
444
+ 1435795200000, 1467417600000, 1489752000000, 1502798400000
445
+ ]);
446
+ expect(out.y).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]);
447
+ expect(out.z).toBeCloseTo2DArray([
448
+ [0, 50, 100],
449
+ [50, 0, 510],
450
+ [100, 255, 1010]
451
452
453
454
455
describe('heatmap plot', function() {
0 commit comments