Fix minor javascript problems

- Make sure that the growth rates values used for the charts are Number
- Send the catalogue version as FormData instead of json for the update
- Fix a bug that prevented the display of the characters in the home
page at application startup
This commit is contained in:
dario-cfpt
2020-03-09 22:47:03 +01:00
parent 2d2bf6ea88
commit 7d98eddfe8
3 changed files with 10 additions and 10 deletions

View File

@ -29,7 +29,7 @@ function displayColumnChartOfClassGrowthRates() {
};
classGrowthRates.forEach(gr => {
statsValues.push(gr.value);
statsValues.push(Number(gr.value));
});
classData.data = statsValues;
@ -39,7 +39,7 @@ function displayColumnChartOfClassGrowthRates() {
function displayPolarSpiderOfClassGrowthRates() {
const classGrowthRates = getClassGrowthRates(actualClassId);
const statsNames = feData.stats.map(x => x.name);
const statsValues = classGrowthRates.map(x => x.value);
const statsValues = classGrowthRates.map(x => Number(x.value));
const classData = [{
name: feData.classes.find(x => x.id == actualClassId).name,