|
|
|
@ -9,7 +9,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('load json', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
json: { |
|
|
|
@ -18,7 +18,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should draw correctly', function () { |
|
|
|
@ -31,7 +30,8 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('more data', function(){ |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
json: [{ |
|
|
|
@ -57,7 +57,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should draw correctly', function () { |
|
|
|
@ -74,8 +73,10 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+circle.attr('cy')).toBeCloseTo(expectedCy[995][i], 0); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update nested JSON args', function () { |
|
|
|
|
describe('with nested JSON args', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
json: [{ |
|
|
|
@ -112,7 +113,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should draw nested JSON correctly', function () { |
|
|
|
@ -162,11 +162,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+circle.attr('cy')).toBeCloseTo(expectedCy[556][i], 0); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('function in data.order', function () { |
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -179,7 +179,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should return false in isOrderAsc and isOrderDesc functions', function () { |
|
|
|
@ -189,7 +188,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('data.xs', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -199,7 +198,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
], |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('normal x', function () { |
|
|
|
@ -224,7 +222,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
describe('timeseries x', function () { |
|
|
|
|
describe('without xFormat', function () { |
|
|
|
|
|
|
|
|
|
it('should load timeseries data successfully', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
x : 'date', |
|
|
|
@ -240,7 +238,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have correct number of xs', function () { |
|
|
|
@ -262,7 +259,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('with xFormat', function () { |
|
|
|
|
describe('timeseries x with xFormat', function () { |
|
|
|
|
it('should load timeseries data successfully', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
x : 'date', |
|
|
|
@ -279,7 +276,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have correct number of xs', function () { |
|
|
|
@ -304,8 +300,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
describe('milliseconds timeseries x', function () { |
|
|
|
|
|
|
|
|
|
describe('as date string', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
x : 'date', |
|
|
|
@ -326,7 +321,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have correct number of xs', function () { |
|
|
|
@ -354,7 +348,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('as unixtime number', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
x : 'date', |
|
|
|
@ -373,7 +367,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have correct number of xs', function () { |
|
|
|
@ -399,7 +392,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('on line chart', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -412,7 +405,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
labels: true, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -437,9 +429,9 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args to be stacked', function () { |
|
|
|
|
describe('with stacked', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.groups = [['data1', 'data2'], ['data3', 'data4']]; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -463,12 +455,12 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on area chart', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -481,7 +473,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
labels: true, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -506,9 +497,9 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args to be stacked', function () { |
|
|
|
|
describe('with stacked', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.groups = [['data1', 'data2'], ['data3', 'data4']]; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -532,12 +523,13 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on bar chart', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -550,7 +542,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
labels: true, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -575,9 +566,9 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args to be stacked', function () { |
|
|
|
|
describe('with stacked', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.groups = [['data1', 'data2'], ['data3', 'data4']]; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should locate data labels in correct position', function () { |
|
|
|
@ -601,12 +592,13 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('for all targets', function () { |
|
|
|
|
|
|
|
|
|
it('should update args to show data label for all data', function () { |
|
|
|
|
describe('with data label for all data', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -617,7 +609,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
labels: true |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have data labels on all data', function () { |
|
|
|
@ -631,14 +622,15 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(d3.select(this).text()).toBe(args.data.columns[2][i + 1] + ''); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('for each target', function () { |
|
|
|
|
|
|
|
|
|
describe('as true', function () { |
|
|
|
|
|
|
|
|
|
it('should update args to show data label for only data1', function () { |
|
|
|
|
describe('with data label for only data1', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -653,7 +645,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have data labels on all data', function () { |
|
|
|
@ -668,10 +659,12 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('as function', function () { |
|
|
|
|
|
|
|
|
|
it('should update args to show data label for only data1', function () { |
|
|
|
|
describe('with data label for only data1', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -686,7 +679,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have data labels on all data', function () { |
|
|
|
@ -701,12 +693,14 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('with small values', function () { |
|
|
|
|
|
|
|
|
|
it('should update args to show data label', function () { |
|
|
|
|
describe('with data label', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -715,7 +709,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
labels: true |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have proper y domain', function () { |
|
|
|
@ -724,12 +717,13 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(domain[1]).toBeCloseTo(0.45); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('with positive values and null', function () { |
|
|
|
|
|
|
|
|
|
describe('on not rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
beforeAll(function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -746,7 +740,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -766,9 +759,9 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -787,17 +780,17 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'bar'; |
|
|
|
|
args.axis = { |
|
|
|
|
rotated: true |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -816,10 +809,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -838,7 +832,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
@ -847,7 +841,8 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('on not rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -864,7 +859,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -883,10 +877,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -905,17 +900,17 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'bar'; |
|
|
|
|
args.axis = { |
|
|
|
|
rotated: true |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -934,10 +929,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -956,7 +952,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
@ -965,7 +961,8 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('on non rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -982,7 +979,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1001,10 +997,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1024,15 +1021,16 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'bar'; |
|
|
|
|
args.axis = { |
|
|
|
|
rotated: true |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1051,10 +1049,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1074,6 +1073,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -1081,7 +1081,8 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('on non rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -1094,7 +1095,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
type: 'bar', |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1113,10 +1113,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1135,17 +1136,17 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'bar'; |
|
|
|
|
args.axis = { |
|
|
|
|
rotated: true |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1164,10 +1165,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1187,6 +1189,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -1194,7 +1197,8 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('on non rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
@ -1207,7 +1211,6 @@ describe('c3 chart data', function () {
|
|
|
|
|
type: 'bar', |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1226,10 +1229,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1248,17 +1252,17 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('on rotated axis', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type bar', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'bar'; |
|
|
|
|
args.axis = { |
|
|
|
|
rotated: true |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1277,10 +1281,11 @@ describe('c3 chart data', function () {
|
|
|
|
|
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
describe('data type line', function () { |
|
|
|
|
beforeAll(function(){ |
|
|
|
|
args.data.type = 'line'; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should have y domain with proper padding', function () { |
|
|
|
@ -1300,6 +1305,7 @@ describe('c3 chart data', function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|