mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2025-01-03 10:22:11 +01:00
Compute the radius of the pie
This commit is contained in:
parent
25ad4f7afd
commit
03190c52d0
1 changed files with 7 additions and 3 deletions
|
@ -83,14 +83,18 @@ if (!options.end || !options.end.isValid()) {
|
||||||
|
|
||||||
if (authorsOpt.is_provided) {
|
if (authorsOpt.is_provided) {
|
||||||
options.repo = process.cwd();
|
options.repo = process.cwd();
|
||||||
|
options.no_ansi = noAnsiOpt.is_provided;
|
||||||
|
options.radius = (process.stdout.rows / 2) - 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the graphs
|
// Show the graphs
|
||||||
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
|
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
|
||||||
if (err) { return Logger.log(err, "error"); }
|
if (err) { return Logger.log(err, "error"); }
|
||||||
|
if (!authorsOpt.is_provided) {
|
||||||
data = AnsiParser.removeAnsi(data);
|
data = AnsiParser.removeAnsi(data);
|
||||||
if (!noAnsiOpt.is_provided) {
|
if (!noAnsiOpt.is_provided) {
|
||||||
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
process.stdout.write(data + "\n");
|
process.stdout.write(data + "\n");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue