mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 05:12: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) {
|
||||
options.repo = process.cwd();
|
||||
options.no_ansi = noAnsiOpt.is_provided;
|
||||
options.radius = (process.stdout.rows / 2) - 4;
|
||||
}
|
||||
|
||||
// Show the graphs
|
||||
GitStats[authorsOpt.is_provided ? "authorsPie" : "ansiCalendar"](options, function (err, data) {
|
||||
if (err) { return Logger.log(err, "error"); }
|
||||
data = AnsiParser.removeAnsi(data);
|
||||
if (!noAnsiOpt.is_provided) {
|
||||
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
||||
if (!authorsOpt.is_provided) {
|
||||
data = AnsiParser.removeAnsi(data);
|
||||
if (!noAnsiOpt.is_provided) {
|
||||
data = GitStatsColors(data, lightOpt.is_provided ? "LIGHT": "DARK");
|
||||
}
|
||||
}
|
||||
process.stdout.write(data + "\n");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue