removed account dependency

This commit is contained in:
Miodec 2022-02-10 23:49:23 +01:00
parent 8b2838e023
commit 95a969b147
2 changed files with 4 additions and 9 deletions

View file

@ -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;
},
},

View file

@ -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(
{