Add classes for the stat page

Also removed the pie chart graph because it wasn't really useful.
This commit is contained in:
dario-cfpt
2020-02-04 08:45:43 +01:00
parent f0ed0e519c
commit fa173d1f19
8 changed files with 73 additions and 102 deletions

View File

@ -28,12 +28,10 @@ routes = [
$$("#picture-char").attr("src", "img/characters/" + char.firstName + ".png");
actualCharId = charId;
createTableOfStats();
createListOfAvailableClasses()
displayTableOfGrowthRates();
$$("#select-graph").on("change", () => {
displayGraphOfGrowthRates();
});
}
createEventForGraphSwitch(displayGraphOfGrowthRates);
}
}
},
@ -42,14 +40,7 @@ routes = [
path: '/comparator/',
templateUrl: './pages/comparator.html',
on: {
pageInit: (e, page) => {
$$("#btn-graph-column-chart").on("click", (event) => {
switchGraph(event);
});
$$("#btn-graph-spider-web").on("click", (event) => {
switchGraph(event);
});
},
pageInit: (e, page) => createEventForGraphSwitch(displayCurrentGraph),
// We must use the pageAfterIn event in order to open the smartselect directly
pageAfterIn: (e, page) => {
configureSmartSelectOfCharacters();
@ -67,4 +58,12 @@ routes = [
templateUrl: './pages/about.html'
},
];
function createEventForGraphSwitch(callback) {
$$("#btn-graph-column-chart").on("click", (event) => {
switchGraph(event, callback);
});
$$("#btn-graph-spider-web").on("click", (event) => {
switchGraph(event, callback);
});
}