mirror of https://github.com/masayuki0812/c3.git
Quite good looking graph derived from d3.js
http://c3js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
763 B
34 lines
763 B
9 years ago
|
describe('c3 api pie', function () {
|
||
|
'use strict';
|
||
|
|
||
|
var chart;
|
||
|
|
||
|
var args = {
|
||
|
data: {
|
||
|
columns: [
|
||
|
['data1', 30],
|
||
|
['data2', 1000],
|
||
|
['data3', 5000]
|
||
|
]
|
||
|
},
|
||
|
type: 'pie',
|
||
|
pie: {
|
||
|
explodeRadius: 10
|
||
|
}
|
||
|
};
|
||
|
|
||
|
beforeEach(function (done) {
|
||
|
chart = window.initChart(chart, args, done);
|
||
|
});
|
||
|
|
||
|
describe('explodeRadius', function(){
|
||
|
it('should get explode radius', function(){
|
||
|
expect(chart.pie.explodeRadius()).toBe(10);
|
||
|
});
|
||
|
|
||
|
it('should set explode radius', function(){
|
||
|
chart.pie.explodeRadius(20);
|
||
|
expect(chart.pie.explodeRadius()).toBe(20);
|
||
|
});
|
||
|
});
|
||
|
});
|