|
|
@ -20,6 +20,11 @@ describe('c3 chart shape line', function () { |
|
|
|
['data3', -150, 120, 110, 140, 115, 125] |
|
|
|
['data3', -150, 120, 110, 140, 115, 125] |
|
|
|
], |
|
|
|
], |
|
|
|
type: 'line' |
|
|
|
type: 'line' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
line: { |
|
|
|
|
|
|
|
step: { |
|
|
|
|
|
|
|
type: 'step' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -53,6 +58,30 @@ describe('c3 chart shape line', function () { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe('should change to step chart with step-after', function () { |
|
|
|
|
|
|
|
beforeAll(function(){ |
|
|
|
|
|
|
|
args.line.step.type = 'step-after'; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
it("should have shape-rendering = crispedges when it's step chart", function () { |
|
|
|
|
|
|
|
d3.selectAll('.c3-line').each(function () { |
|
|
|
|
|
|
|
var style = d3.select(this).style('shape-rendering').toLowerCase(); |
|
|
|
|
|
|
|
expect(style).toBe('crispedges'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe('should change to step chart with step-before', function () { |
|
|
|
|
|
|
|
beforeAll(function(){ |
|
|
|
|
|
|
|
args.line.step.type = 'step-before'; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
it("should have shape-rendering = crispedges when it's step chart", function () { |
|
|
|
|
|
|
|
d3.selectAll('.c3-line').each(function () { |
|
|
|
|
|
|
|
var style = d3.select(this).style('shape-rendering').toLowerCase(); |
|
|
|
|
|
|
|
expect(style).toBe('crispedges'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
describe('should change to spline chart', function () { |
|
|
|
describe('should change to spline chart', function () { |
|
|
|
beforeAll(function(){ |
|
|
|
beforeAll(function(){ |
|
|
|
args.data.type = 'spline'; |
|
|
|
args.data.type = 'spline'; |
|
|
|