mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-16 18:46:26 +08:00
removed account dependency
This commit is contained in:
parent
8b2838e023
commit
95a969b147
2 changed files with 4 additions and 9 deletions
|
@ -2,7 +2,6 @@ import Chart from "chart.js";
|
|||
import * as TestStats from "../test/test-stats";
|
||||
import * as ThemeColors from "../elements/theme-colors";
|
||||
import * as Misc from "../misc";
|
||||
import * as Account from "../pages/account";
|
||||
import Config, * as UpdateConfig from "../config";
|
||||
|
||||
export let result = new Chart($("#wpmChart"), {
|
||||
|
@ -162,6 +161,8 @@ export let result = new Chart($("#wpmChart"), {
|
|||
},
|
||||
});
|
||||
|
||||
export let accountHistoryActiveIndex;
|
||||
|
||||
export let accountHistory = new Chart($(".pageAccount #accountHistoryChart"), {
|
||||
type: "line",
|
||||
data: {
|
||||
|
@ -247,7 +248,7 @@ export let accountHistory = new Chart($(".pageAccount #accountHistoryChart"), {
|
|||
return;
|
||||
},
|
||||
afterLabel: function (tooltip) {
|
||||
Account.setActiveChartIndex(tooltip.index);
|
||||
accountHistoryActiveIndex = tooltip.index;
|
||||
return;
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1173,14 +1173,8 @@ $(".pageAccount .loadMoreButton").click((e) => {
|
|||
loadMoreLines();
|
||||
});
|
||||
|
||||
let activeChartIndex;
|
||||
|
||||
export function setActiveChartIndex(index) {
|
||||
activeChartIndex = index;
|
||||
}
|
||||
|
||||
$(".pageAccount #accountHistoryChart").click((e) => {
|
||||
let index = activeChartIndex;
|
||||
let index = ChartController.accountHistoryActiveIndex;
|
||||
loadMoreLines(index);
|
||||
$([document.documentElement, document.body]).animate(
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue