mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-23 10:01:58 +08:00
changed default chart animation length
This commit is contained in:
parent
4d5c4dacbb
commit
543f417406
4 changed files with 10 additions and 8 deletions
|
|
@ -49,7 +49,7 @@ export function updateData(data: MonkeyTypes.ChartData): void {
|
|||
ChartController.miniResult.options.scales.yAxes[1].ticks.min = 0;
|
||||
}
|
||||
|
||||
ChartController.miniResult.update({ duration: 0 });
|
||||
ChartController.miniResult.update();
|
||||
}
|
||||
|
||||
$(document).on("click", ".pageAccount .miniResultChartBg", () => {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import * as Misc from "../misc";
|
|||
import Config from "../config";
|
||||
import * as ConfigEvent from "../observables/config-event";
|
||||
|
||||
Chart.defaults.global.animation.duration = 250;
|
||||
|
||||
export let result = new Chart($("#wpmChart"), {
|
||||
type: "line",
|
||||
data: {
|
||||
|
|
@ -737,7 +739,7 @@ export async function updateColors(chart) {
|
|||
// },
|
||||
// });
|
||||
|
||||
chart.update({ duration: 250 });
|
||||
chart.update();
|
||||
}
|
||||
|
||||
Chart.prototype.updateColors = function () {
|
||||
|
|
|
|||
|
|
@ -176,8 +176,8 @@ export function reset(): void {
|
|||
ChartController.accountActivity.data.datasets[1].data = [];
|
||||
ChartController.accountHistory.data.datasets[0].data = [];
|
||||
ChartController.accountHistory.data.datasets[1].data = [];
|
||||
ChartController.accountActivity.update({ duration: 0 });
|
||||
ChartController.accountHistory.update({ duration: 0 });
|
||||
ChartController.accountActivity.update();
|
||||
ChartController.accountHistory.update();
|
||||
}
|
||||
|
||||
type ChartData = {
|
||||
|
|
@ -228,7 +228,7 @@ export function smoothHistory(factor: number): void {
|
|||
|
||||
ChartController.accountHistory.data.datasets[0].data = chartData2;
|
||||
ChartController.accountHistory.data.datasets[1].data = accChartData2;
|
||||
ChartController.accountHistory.update({ duration: 0 });
|
||||
ChartController.accountHistory.update();
|
||||
}
|
||||
|
||||
function applyHistorySmoothing(): void {
|
||||
|
|
@ -865,7 +865,7 @@ export function update(): void {
|
|||
);
|
||||
|
||||
applyHistorySmoothing();
|
||||
ChartController.accountActivity.update({ duration: 0 });
|
||||
ChartController.accountActivity.update();
|
||||
LoadingPage.updateBar(100, true);
|
||||
setTimeout(() => {
|
||||
SignOutButton.show();
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ async function updateGraph() {
|
|||
ChartController.result.options.scales.yAxes[0].ticks.max = maxChartVal;
|
||||
ChartController.result.options.scales.yAxes[1].ticks.max = maxChartVal;
|
||||
|
||||
ChartController.result.update({ duration: 0 });
|
||||
ChartController.result.update();
|
||||
ChartController.result.resize();
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ export async function updateGraphPBLine() {
|
|||
Math.round(maxChartVal);
|
||||
ChartController.result.options.scales.yAxes[1].ticks.max =
|
||||
Math.round(maxChartVal);
|
||||
ChartController.result.update({ duration: 0 });
|
||||
ChartController.result.update();
|
||||
}
|
||||
|
||||
function updateWpmAndAcc() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue