Skip to content

Commit

Permalink
fix float number parsing of average line value in bar chart
Browse files Browse the repository at this point in the history
  • Loading branch information
cDanowski committed May 28, 2024
1 parent 846b6d8 commit d8825b0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,12 @@ angular
measureOfValue);

let meanLineLabel = "rechnerischer Durchschnitt";
let meanLineValue = parseFloat(kommonitorDataExchangeService.allFeaturesMean);
// replace formatted string like "12.506,32" to 12506.32 in order to parse the correct number
let meanLineValue = parseFloat(kommonitorDataExchangeService.allFeaturesMean.replace(/\./g, '').replace(/,/g, '.'));

if(kommonitorDataExchangeService.allFeaturesRegionalMean){
meanLineLabel = "gesamtregionaler Durchschnitt";
meanLineValue = parseFloat(kommonitorDataExchangeService.allFeaturesRegionalMean);
meanLineValue = parseFloat(kommonitorDataExchangeService.allFeaturesRegionalMean.replace(/\./g, '').replace(/,/g, '.'));
}

var barOption = {
Expand Down

0 comments on commit d8825b0

Please sign in to comment.