Send the radius and no_ansi values

This commit is contained in:
Ionică Bizău 2015-05-28 19:56:32 +03:00
parent 2c26a37c9a
commit 25ad4f7afd
1 changed files with 8 additions and 3 deletions

View File

@ -155,11 +155,11 @@ GitStats.iterateDays = function (data, callback) {
}
// Merge the defaults
data = Ul.merge({
data = Ul.merge(data, {
end: Moment()
, start: Moment().subtract(1, "years")
, format: DATE_FORMAT
}, data);
});
var start = data.start
, end = data.end
@ -409,6 +409,10 @@ GitStats.authorsPie = function (options, callback) {
};
}
options = Ul.merge(options, {
radius: process.stdout.rows / 2 || 20
});
if (!IsThere.sync(options.repo)) {
return callback(new Error("Repository is missing."));
}
@ -432,9 +436,10 @@ GitStats.authorsPie = function (options, callback) {
};
});
pie = new CliPie(20, pieData, {
pie = new CliPie(options.radius, pieData, {
legend: true
, flat: true
, no_ansi: options.no_ansi
});
callback(null, pie.toString());