mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
fixed start graphs at zero not working properly
This commit is contained in:
parent
20418b74b8
commit
888df4413a
2 changed files with 9 additions and 0 deletions
|
@ -840,6 +840,9 @@ function updateHoverChart(filteredId) {
|
|||
if (!config.startGraphsAtZero) {
|
||||
hoverChart.options.scales.yAxes[0].ticks.min = Math.round(minChartVal);
|
||||
hoverChart.options.scales.yAxes[1].ticks.min = Math.round(minChartVal);
|
||||
} else {
|
||||
hoverChart.options.scales.yAxes[0].ticks.min = 0;
|
||||
hoverChart.options.scales.yAxes[1].ticks.min = 0;
|
||||
}
|
||||
|
||||
hoverChart.update({ duration: 0 });
|
||||
|
@ -2183,6 +2186,9 @@ function refreshAccountPage() {
|
|||
resultHistoryChart.options.scales.yAxes[1].ticks.min = Math.floor(
|
||||
minAccuracyChartVal
|
||||
);
|
||||
} else {
|
||||
resultHistoryChart.options.scales.yAxes[0].ticks.min = 0;
|
||||
resultHistoryChart.options.scales.yAxes[1].ticks.min = 0;
|
||||
}
|
||||
|
||||
if (chartData == [] || chartData.length == 0) {
|
||||
|
|
|
@ -1808,6 +1808,9 @@ function showResult(difficultyFailed = false) {
|
|||
if (!config.startGraphsAtZero) {
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.min = minChartVal;
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.min = minChartVal;
|
||||
} else {
|
||||
wpmOverTimeChart.options.scales.yAxes[0].ticks.min = 0;
|
||||
wpmOverTimeChart.options.scales.yAxes[1].ticks.min = 0;
|
||||
}
|
||||
|
||||
// wpmOverTimeChart.options.scales.yAxes[0].ticks.min = Math.round(minChartVal);
|
||||
|
|
Loading…
Reference in a new issue