diff --git a/js/main.js b/js/main.js index 2fb5244..11a33d6 100644 --- a/js/main.js +++ b/js/main.js @@ -276,11 +276,11 @@ function displayStatsFromGeoJson(resultAsGeojson) { }) let bar_powers = `
${count_output_unknown}
-
${count_station_outputoutput_between_1_and_50}
-
${output_more_than_50}
-
${output_more_than_100}
-
${output_more_than_200}
-
${output_more_than_300}
+
${count_station_outputoutput_between_1_and_50 ? count_station_outputoutput_between_1_and_50 : ''}
+
${output_more_than_50 ? output_more_than_50 : ''}
+
${output_more_than_100 ? output_more_than_100 : ''}
+
${output_more_than_200? output_more_than_200 : '' | ''}
+
${output_more_than_300 ? output_more_than_300 : ''}
` @@ -423,19 +423,21 @@ function displayPointsFromApi(points = geojsondata) { ratio_circle = 0.25 } console.log('ratio_circle', ratio_circle) - if (outPowerGuessed >= 300) { - radius = 70 * ratio_circle - } else if (outPowerGuessed >= 200) { - radius = 60 * ratio_circle - } else if (outPowerGuessed >= 100) { - radius = 50 * ratio_circle - } else if (outPowerGuessed >= 50) { - radius = 40 * ratio_circle - } else if (outPowerGuessed >= 20) { - radius = 30 * ratio_circle - } else if (outPowerGuessed >= 7) { - radius = 20 * ratio_circle - } + radius = outPowerGuessed * ratio_circle + + // if (outPowerGuessed >= 300) { + // radius = 70 * ratio_circle + // } else if (outPowerGuessed >= 200) { + // radius = 60 * ratio_circle + // } else if (outPowerGuessed >= 100) { + // radius = 50 * ratio_circle + // } else if (outPowerGuessed >= 50) { + // radius = 40 * ratio_circle + // } else if (outPowerGuessed >= 20) { + // radius = 30 * ratio_circle + // } else if (outPowerGuessed >= 7) { + // radius = 20 * ratio_circle + // } let circle = L.circle(layer._latlng, { color: color,