Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yaooqinn committed Dec 14, 2023
1 parent 2fae919 commit 6d043c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ function drawAreaStack(id, labels, values) {
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");

var data = values.flatMap(function(d) {
return Object.keys(d).filter(function(key) {
return key !== 'x';
}).map(function(key) {
return Object.keys(d).filter(k => k !== "x").map(function(key) {
return {x: d.x, label: key, duration: +d[key]};
});
});
Expand Down
5 changes: 2 additions & 3 deletions ui-test/tests/structured-streaming-page.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ test('drawAreaStack', function () {

expect($('#duration-area-stack-parent').attr("style")).toBe('padding: 8px 0px 8px 8px; border-right: 0px solid white;');
expect($('#duration-area-stack').find('svg').length).toBe(1);
var xAxis = $('[class="x axis"] text');
expect(xAxis.length).toBe(2);

// test x axis
var xAxis = $('[class="x axis"] text');
expect(xAxis.length).toBe(2);
xAxis.each((index, e) => {
var xAixsText = "";
if (index === 0) {
Expand All @@ -93,7 +93,6 @@ test('drawAreaStack', function () {
// test y axis
var yAxis = $('[class="y axis"] text');
expect(yAxis.length).toBe(7);

yAxis.each((index, e) => {
if (index < yAxis.length - 1) {
expect(e.innerHTML).toBe(5000 * index + "")
Expand Down

0 comments on commit 6d043c2

Please sign in to comment.