mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 14:10:59 +08:00
Fix positions of pb and average lines when disabling start graph at 0 (#4103) albertying
* Change accountHistory y-axis min of average and pb lines * extract the floor operation into a variable * remove whitespace * setting to 0 --------- Co-authored-by: Evan <64989416+Ferotiq@users.noreply.github.com> Co-authored-by: Evan <evanrayweigel@outlook.com> Co-authored-by: Miodec <jack@monkeytype.com>
This commit is contained in:
parent
317f5b23ba
commit
98b777dfcb
1 changed files with 9 additions and 1 deletions
|
|
@ -798,9 +798,17 @@ function fillContent(): void {
|
|||
Math.floor(maxWpmChartVal) + (10 - (Math.floor(maxWpmChartVal) % 10));
|
||||
|
||||
if (!Config.startGraphsAtZero) {
|
||||
accountHistoryScaleOptions["wpm"].min = Math.floor(minWpmChartVal);
|
||||
const minWpmChartValFloor = Math.floor(minWpmChartVal);
|
||||
|
||||
accountHistoryScaleOptions["wpm"].min = minWpmChartValFloor;
|
||||
accountHistoryScaleOptions["pb"].min = minWpmChartValFloor;
|
||||
accountHistoryScaleOptions["wpmAvgTen"].min = minWpmChartValFloor;
|
||||
accountHistoryScaleOptions["wpmAvgHundred"].min = minWpmChartValFloor;
|
||||
} else {
|
||||
accountHistoryScaleOptions["wpm"].min = 0;
|
||||
accountHistoryScaleOptions["pb"].min = 0;
|
||||
accountHistoryScaleOptions["wpmAvgTen"].min = 0;
|
||||
accountHistoryScaleOptions["wpmAvgHundred"].min = 0;
|
||||
}
|
||||
|
||||
if (!chartData || chartData.length == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue