Compare commits

..

No commits in common. '168fb55cfa29c6331d0dc940b57bcaa3dc1ba4b0' and 'c07d9f1c740307a847c472ff1967d06de9a98bac' have entirely different histories.

  1. 13
      public/elotracker/chart-integration.js

@ -59,7 +59,7 @@ const trigger_legend_hover = function (legendItem, chart) {
dataset.borderWidth = legendItem.datasetIndex === i ? 4 : 3;
dataset.pointRadius = dataset.pointRadius===0 ? 0 : 2;
});
chart.update("none");
chart.update();
}
const trigger_legend_leave = function (chart) {
chart.data.datasets.forEach((dataset, i) => {
@ -67,7 +67,7 @@ const trigger_legend_leave = function (chart) {
dataset.borderColor = dataset.borderColor.length === 9 ? dataset.borderColor.slice(0, -2) : dataset.borderColor;
dataset.borderWidth = 3;
});
chart.update("none");
chart.update();
hovered = false;
}
const trigger_legend_click = function (item) {
@ -469,7 +469,7 @@ function getColor(num) {
return colors[num % 9];
}
async function toggle_combined_chart() {
function toggle_combined_chart() {
const comb_charts = this.parentNode.parentNode.querySelectorAll(`.leaderboard>.graph-wrapper`);
const chart = this.parentNode.parentNode.querySelector(`.graph-wrapper.${this.id}`);
const buttons = document.querySelectorAll("button.open-general-graph");
@ -477,9 +477,6 @@ async function toggle_combined_chart() {
const all_legends = document.querySelectorAll(`#combined-chart-legends .chart-legend`);
all_legends.forEach(element => {element.classList.add("hidden")});
legend.classList.remove("hidden");
combined_charts.forEach(c_chart => {
c_chart.options.animation = false;
})
if (chart.classList.contains("closed")) {
comb_charts.forEach(element => element.classList.add("closed"));
buttons.forEach(element => element.classList.remove("dropdown-open"));
@ -491,10 +488,6 @@ async function toggle_combined_chart() {
this.classList.remove("dropdown-open");
document.querySelector("#combined-chart-legends").classList.add("hidden");
}
await new Promise(r => setTimeout(r,400)); // auf höhen-animation warten
combined_charts.forEach(c_chart => {
c_chart.options.animation = true;
})
}
function toggle_leaderboard_chart(event) {

Loading…
Cancel
Save