mirror of https://github.com/masayuki0812/c3.git
DungSaga
10 years ago
46 changed files with 1541 additions and 5980 deletions
@ -1 +1 @@
|
||||
.c3 svg{font:10px sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-chart-arcs-title{font-size:1.3em}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000;font-size:28px} |
||||
.c3 svg{font:10px sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-chart-arcs-title{font-size:1.3em}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,49 @@
|
||||
<html> |
||||
<head> |
||||
<link rel="stylesheet" type="text/css" href="/css/c3.css"> |
||||
</head> |
||||
<body> |
||||
<div id="chart"></div> |
||||
|
||||
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> |
||||
<script src="/js/c3.js"></script> |
||||
<script> |
||||
|
||||
var chart = c3.generate({ |
||||
data: { |
||||
x: 'date', |
||||
columns: [ |
||||
['date', '2014-01-01', '2014-01-10', '2014-01-20', '2014-01-30', '2014-02-01'], |
||||
['sample', 30, 200, 100, 400, 150, 250] |
||||
] |
||||
}, |
||||
axis: { |
||||
x: { |
||||
type: 'timeseries', |
||||
tick: { |
||||
format: '%Y%m%d %H:%M:%S' |
||||
} |
||||
}, |
||||
}, |
||||
regions: [ |
||||
{start: '2014-01-05', end: '2014-01-10'}, |
||||
// {start: new Date('2014-01-10'), end: new Date('2014-01-15')}, |
||||
{start: 1390608000000, end: 1391040000000} |
||||
] |
||||
}); |
||||
|
||||
setTimeout(function () { |
||||
chart.load({ |
||||
columns: [ |
||||
['date', +new Date('2014-01-01'), +new Date('2014-01-10'), +new Date('2014-03-01')], |
||||
['sample', 100, 200, 300] |
||||
] |
||||
}); |
||||
chart.regions([ |
||||
{start: +new Date('2014-01-10'), end: +new Date('2014-01-15')} |
||||
]); |
||||
}, 1000); |
||||
|
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,122 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 api grid', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3; |
||||
|
||||
var args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30, 200, 100, 400, 150, 250] |
||||
] |
||||
} |
||||
}; |
||||
|
||||
beforeEach(function (done) { |
||||
chart = window.initChart(chart, args, done); |
||||
d3 = chart.internal.d3; |
||||
}); |
||||
|
||||
describe('ygrid.add and ygrid.remove', function () { |
||||
|
||||
it('should update y grids', function (done) { |
||||
var main = chart.internal.main, |
||||
expectedGrids = [ |
||||
{ |
||||
value: 100, |
||||
text: 'Pressure Low' |
||||
}, |
||||
{ |
||||
value: 200, |
||||
text: 'Pressure High' |
||||
} |
||||
], |
||||
grids; |
||||
|
||||
// Call ygrids.add
|
||||
chart.ygrids.add(expectedGrids); |
||||
setTimeout(function () { |
||||
grids = main.selectAll('.c3-ygrid-line'); |
||||
expect(grids.size()).toBe(expectedGrids.length); |
||||
grids.each(function (d, i) { |
||||
var y = +d3.select(this).select('line').attr('y1'), |
||||
text = d3.select(this).select('text').text(), |
||||
expectedY = Math.round(chart.internal.y(expectedGrids[i].value)), |
||||
expectedText = expectedGrids[i].text; |
||||
expect(y).toBe(expectedY); |
||||
expect(text).toBe(expectedText); |
||||
}); |
||||
|
||||
// Call ygrids.remove
|
||||
chart.ygrids.remove(expectedGrids); |
||||
setTimeout(function () { |
||||
grids = main.selectAll('.c3-ygrid-line'); |
||||
expect(grids.size()).toBe(0); |
||||
}, 500); |
||||
|
||||
}, 500); |
||||
|
||||
setTimeout(function () { |
||||
done(); |
||||
}, 1200); |
||||
}); |
||||
|
||||
it("should update x ygrids even if it's zoomed", function (done) { |
||||
var main = chart.internal.main, |
||||
expectedGrids = [ |
||||
{ |
||||
value: 0, |
||||
text: 'Pressure Low' |
||||
}, |
||||
{ |
||||
value: 1, |
||||
text: 'Pressure High' |
||||
} |
||||
], |
||||
grids, domain; |
||||
|
||||
chart.zoom([0, 2]); |
||||
setTimeout(function () { |
||||
|
||||
// Call xgrids
|
||||
chart.xgrids(expectedGrids); |
||||
setTimeout(function () { |
||||
grids = main.selectAll('.c3-xgrid-line'); |
||||
expect(grids.size()).toBe(expectedGrids.length); |
||||
grids.each(function (d, i) { |
||||
var x = +d3.select(this).select('line').attr('x1'), |
||||
text = d3.select(this).select('text').text(), |
||||
expectedX = Math.round(chart.internal.x(expectedGrids[i].value)), |
||||
expectedText = expectedGrids[i].text; |
||||
expect(x).toBe(expectedX); |
||||
expect(text).toBe(expectedText); |
||||
}); |
||||
|
||||
// check if it was not rescaled
|
||||
domain = chart.internal.y.domain(); |
||||
expect(domain[0]).toBeLessThan(0); |
||||
expect(domain[1]).toBeGreaterThan(400); |
||||
|
||||
// Call xgrids.remove
|
||||
chart.xgrids.remove(expectedGrids); |
||||
setTimeout(function () { |
||||
grids = main.selectAll('.c3-xgrid-line'); |
||||
expect(grids.size()).toBe(0); |
||||
}, 500); // for xgrids.remove()
|
||||
|
||||
}, 500); // for xgrids()
|
||||
|
||||
}, 500); // for zoom
|
||||
|
||||
setTimeout(function () { |
||||
done(); |
||||
}, 1700); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,78 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 chart axis', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3, args; |
||||
|
||||
beforeEach(function (done) { |
||||
if (typeof chart === 'undefined') { |
||||
window.initDom(); |
||||
} |
||||
chart = window.c3.generate(args); |
||||
d3 = chart.internal.d3; |
||||
chart.internal.d3.select('.jasmine_html-reporter') |
||||
.style('position', 'absolute') |
||||
.style('right', 0); |
||||
|
||||
window.setTimeout(function () { |
||||
done(); |
||||
}, 50); |
||||
}); |
||||
|
||||
describe('show pie chart', function () { |
||||
|
||||
args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30], |
||||
['data2', 150], |
||||
['data3', 120] |
||||
], |
||||
type: 'pie' |
||||
} |
||||
}; |
||||
|
||||
it('should have correct classes', function () { |
||||
var chartArc = d3.select('.c3-chart-arcs'), |
||||
arcs = { |
||||
data1: chartArc.select('.c3-chart-arc.c3-target.c3-target-data1') |
||||
.select('g.c3-shapes.c3-shapes-data1.c3-arcs.c3-arcs-data1') |
||||
.select('path.c3-shape.c3-shape.c3-arc.c3-arc-data1'), |
||||
data2: chartArc.select('.c3-chart-arc.c3-target.c3-target-data2') |
||||
.select('g.c3-shapes.c3-shapes-data2.c3-arcs.c3-arcs-data2') |
||||
.select('path.c3-shape.c3-shape.c3-arc.c3-arc-data2'), |
||||
data3: chartArc.select('.c3-chart-arc.c3-target.c3-target-data3') |
||||
.select('g.c3-shapes.c3-shapes-data3.c3-arcs.c3-arcs-data3') |
||||
.select('path.c3-shape.c3-shape.c3-arc.c3-arc-data3') |
||||
}; |
||||
expect(arcs.data1.size()).toBe(1); |
||||
expect(arcs.data2.size()).toBe(1); |
||||
expect(arcs.data3.size()).toBe(1); |
||||
}); |
||||
|
||||
it('should have correct d', function () { |
||||
expect(d3.select('.c3-arc-data1').attr('d')).toMatch(/M-124\..+,-171\..+A211\..+,211\..+ 0 0,1 -3\..+,-211\..+L0,0Z/); |
||||
expect(d3.select('.c3-arc-data2').attr('d')).toMatch(/M1\..+,-211\..+A211\..+,211\..+ 0 0,1 1\..+,211\..+L0,0Z/); |
||||
expect(d3.select('.c3-arc-data3').attr('d')).toMatch(/M1\..+,211\..+A211\..+,211\..+ 0 0,1 -124\..+,-171\..+L0,0Z/); |
||||
}); |
||||
|
||||
it('should set args with data id that can be converted to a color', function () { |
||||
args.data.columns = [ |
||||
['black', 30], |
||||
['data2', 150], |
||||
['data3', 120] |
||||
]; |
||||
expect(true).toBeTruthy(); |
||||
}); |
||||
|
||||
it('should have correct d even if data id can be converted to a color', function () { |
||||
expect(d3.select('.c3-arc-black').attr('d')).toMatch(/M-124\..+,-171\..+A211\..+,211\..+ 0 0,1 -3\..+,-211\..+L0,0Z/); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,67 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 chart class', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3; |
||||
|
||||
var args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30, 200, 100, 400, 150, 250], |
||||
['data2 prefix', 50, 20, 10, 40, 15, 25], |
||||
['data3 мужчины', 150, 120, 110, 140, 115, 125] |
||||
] |
||||
} |
||||
}; |
||||
|
||||
beforeEach(function (done) { |
||||
chart = window.initChart(chart, args, done); |
||||
d3 = chart.internal.d3; |
||||
}); |
||||
|
||||
describe('internal.getTargetSelectorSuffix', function () { |
||||
|
||||
it('should not replace any characters', function () { |
||||
var input = 'data1', |
||||
expected = '-' + input, |
||||
suffix = chart.internal.getTargetSelectorSuffix(input); |
||||
expect(suffix).toBe(expected); |
||||
}); |
||||
|
||||
it('should replace space to "-"', function () { |
||||
var input = 'data1 suffix', |
||||
expected = '-data1-suffix', |
||||
suffix = chart.internal.getTargetSelectorSuffix(input); |
||||
expect(suffix).toBe(expected); |
||||
}); |
||||
|
||||
it('should replace space to "-" with multibyte characters', function () { |
||||
var input = 'data1 suffix 日本語', |
||||
expected = '-data1-suffix-日本語', |
||||
suffix = chart.internal.getTargetSelectorSuffix(input); |
||||
expect(suffix).toBe(expected); |
||||
}); |
||||
|
||||
it('should replace special charactors to "-"', function () { |
||||
var input = 'data1 !@#$%^&*()_=+,.<>"\':;[]/|?~`{}\\', |
||||
expected = '-data1--------------------------------', |
||||
suffix = chart.internal.getTargetSelectorSuffix(input); |
||||
expect(suffix).toBe(expected); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
describe('multibyte characters on chart', function () { |
||||
|
||||
it('should replace space to "-" with multibyte characters', function () { |
||||
var selector = '.c3-target-data3-мужчины'; |
||||
expect(chart.internal.main.select(selector).size()).toBe(1); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,83 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 chart grid', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3; |
||||
|
||||
var args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30, 200, 100, 400, 150, 250] |
||||
] |
||||
}, |
||||
axis: { |
||||
y: { |
||||
tick: { |
||||
} |
||||
} |
||||
}, |
||||
grid: { |
||||
y: { |
||||
show: false |
||||
} |
||||
} |
||||
}; |
||||
|
||||
beforeEach(function (done) { |
||||
chart = window.initChart(chart, args, done); |
||||
d3 = chart.internal.d3; |
||||
}); |
||||
|
||||
describe('y grid', function () { |
||||
|
||||
it('should not show y grids', function () { |
||||
expect(chart.internal.main.select('.c3-ygrids').size()).toBe(0); |
||||
}); |
||||
|
||||
it('should update args to show y grids', function () { |
||||
args.grid.y.show = true; |
||||
expect(true).toBeTruthy(); |
||||
}); |
||||
|
||||
it('should show y grids', function () { |
||||
var ygrids = chart.internal.main.select('.c3-ygrids'); |
||||
expect(ygrids.size()).toBe(1); |
||||
expect(ygrids.selectAll('.c3-ygrid').size()).toBe(9); |
||||
}); |
||||
|
||||
it('should update args to show only 3 y grids', function () { |
||||
args.grid.y.ticks = 3; |
||||
expect(true).toBeTruthy(); |
||||
}); |
||||
|
||||
it('should show only 3 y grids', function () { |
||||
var ygrids = chart.internal.main.select('.c3-ygrids'); |
||||
expect(ygrids.size()).toBe(1); |
||||
expect(ygrids.selectAll('.c3-ygrid').size()).toBe(3); |
||||
}); |
||||
|
||||
it('should update args to show y grids depending on y axis ticks', function () { |
||||
args.axis.y.tick.count = 5; |
||||
expect(true).toBeTruthy(); |
||||
}); |
||||
|
||||
it('should show grids depending on y axis ticks', function () { |
||||
var ygrids = chart.internal.main.select('.c3-ygrids'), |
||||
expectedYs = []; |
||||
ygrids.selectAll('.c3-ygrid').each(function (d, i) { |
||||
expectedYs[i] = +d3.select(this).attr('y1'); |
||||
}); |
||||
expect(ygrids.size()).toBe(1); |
||||
expect(ygrids.selectAll('.c3-ygrid').size()).toBe(5); |
||||
chart.internal.main.select('.c3-axis-y').selectAll('.tick').each(function (d, i) { |
||||
var t = d3.transform(d3.select(this).attr('transform')); |
||||
expect(t.translate[1]).toBe(expectedYs[i]); |
||||
}); |
||||
}); |
||||
|
||||
}); |
||||
}); |
@ -0,0 +1,69 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 chart tooltip', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3; |
||||
|
||||
var args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30, 200, 100, 400, 150, 250], |
||||
['data2', 50, 20, 10, 40, 15, 25], |
||||
['data3', 150, 120, 110, 140, 115, 125] |
||||
] |
||||
} |
||||
}; |
||||
|
||||
beforeEach(function (done) { |
||||
chart = window.initChart(chart, args, done); |
||||
d3 = chart.internal.d3; |
||||
}); |
||||
|
||||
describe('tooltip position', function () { |
||||
|
||||
describe('without left margin', function () { |
||||
|
||||
it('should show tooltip on proper position', function () { |
||||
var eventRect = d3.select('.c3-event-rect-2').node(); |
||||
window.setMouseEvent(chart, 'mousemove', 100, 100, eventRect); |
||||
|
||||
var tooltipContainer = d3.select('.c3-tooltip-container'), |
||||
top = Math.floor(+tooltipContainer.style('top').replace(/px/, '')), |
||||
left = Math.floor(+tooltipContainer.style('left').replace(/px/, '')), |
||||
topExpected = 115, |
||||
leftExpected = 304; |
||||
expect(top).toBe(topExpected); |
||||
expect(left).toBe(leftExpected); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
describe('with left margin', function () { |
||||
|
||||
it('should set left margin', function () { |
||||
d3.select('#chart').style('margin-left', '300px'); |
||||
expect(true).toBeTruthy(); |
||||
}); |
||||
|
||||
it('should show tooltip on proper position', function () { |
||||
var eventRect = d3.select('.c3-event-rect-2').node(); |
||||
window.setMouseEvent(chart, 'mousemove', 100, 100, eventRect); |
||||
|
||||
var tooltipContainer = d3.select('.c3-tooltip-container'), |
||||
top = Math.floor(+tooltipContainer.style('top').replace(/px/, '')), |
||||
left = Math.floor(+tooltipContainer.style('left').replace(/px/, '')), |
||||
topExpected = 115, |
||||
leftExpected = 304; |
||||
expect(top).toBe(topExpected); |
||||
expect(left).toBe(leftExpected); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
@ -0,0 +1,73 @@
|
||||
var describe = window.describe, |
||||
expect = window.expect, |
||||
it = window.it, |
||||
beforeEach = window.beforeEach; |
||||
|
||||
describe('c3 chart zoom', function () { |
||||
'use strict'; |
||||
|
||||
var chart, d3; |
||||
|
||||
var args = { |
||||
data: { |
||||
columns: [ |
||||
['data1', 30, 200, 100, 400, 3150, 250], |
||||
['data2', 50, 20, 10, 40, 15, 6025] |
||||
] |
||||
}, |
||||
axis: { |
||||
x: { |
||||
extent: [1, 2] |
||||
} |
||||
}, |
||||
zoom: { |
||||
enable: true |
||||
}, |
||||
subchart: { |
||||
show: true |
||||
} |
||||
}; |
||||
|
||||
beforeEach(function (done) { |
||||
chart = window.initChart(chart, args, done); |
||||
d3 = chart.internal.d3; |
||||
}); |
||||
|
||||
describe('default extent', function () { |
||||
|
||||
describe('main chart domain', function () { |
||||
|
||||
it('should have original y domain', function () { |
||||
var yDomain = chart.internal.y.domain(), |
||||
expectedYDomain = [-591.5, 6626.5]; |
||||
expect(yDomain[0]).toBe(expectedYDomain[0]); |
||||
expect(yDomain[1]).toBe(expectedYDomain[1]); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
describe('main chart domain', function () { |
||||
|
||||
it('should have original y domain in subchart', function () { |
||||
var yDomain = chart.internal.y.domain(), |
||||
subYDomain = chart.internal.subY.domain(); |
||||
expect(subYDomain[0]).toBe(yDomain[0]); |
||||
expect(subYDomain[1]).toBe(yDomain[1]); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
describe('main chart domain', function () { |
||||
|
||||
it('should have specified brush extent', function () { |
||||
var brushExtent = chart.internal.brush.extent(), |
||||
expectedBrushExtent = [1, 2]; |
||||
expect(brushExtent[0]).toBe(expectedBrushExtent[0]); |
||||
expect(brushExtent[1]).toBe(expectedBrushExtent[1]); |
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
||||
|
||||
}); |
Loading…
Reference in new issue