Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 3a6f416

Browse files
SORMAS-Foundation#2528 - Added translation, increased font size of bar labels
1 parent ba0e3c1 commit 3a6f416

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,9 @@ public interface Captions {
600600
String dashboardShowEvents = "dashboardShowEvents";
601601
String dashboardShowFirstDiseases = "dashboardShowFirstDiseases";
602602
String dashboardShowMinimumEntries = "dashboardShowMinimumEntries";
603+
String dashboardShowPercentageValues = "dashboardShowPercentageValues";
603604
String dashboardShowRegions = "dashboardShowRegions";
605+
String dashboardShowTotalValues = "dashboardShowTotalValues";
604606
String dashboardShowUnconfirmedContacts = "dashboardShowUnconfirmedContacts";
605607
String dashboardSuspect = "dashboardSuspect";
606608
String dashboardSymptomatic = "dashboardSymptomatic";

sormas-api/src/main/resources/captions.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@ dashboardLastReportedDistrict=Last reported district
697697
dashboardFollowUpStatusChart=Follow-up Status Chart
698698
dashboardContactClassificationChart=Contact Classification Chart
699699
dashboardFollowUpUntilChart=Follow-Up Until Chart
700+
dashboardShowPercentageValues=Show percentage values
701+
dashboardShowTotalValues=Show total values
700702

701703
defaultRegion=Default Region
702704
defaultDistrict=Default District

sormas-api/src/main/resources/captions_de-DE.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,8 @@ dashboardLastReportedDistrict=Zuletzt gemeldeter Landkreis
696696
dashboardFollowUpStatusChart=Nachverfolgungs-Statusdiagramm
697697
dashboardContactClassificationChart=Kontakt-Definitionskategorien-Diagramm
698698
dashboardFollowUpUntilChart=Nachverfolgung bis- Diagramm
699+
dashboardShowPercentageValues=Prozentwerte anzeigen
700+
dashboardShowTotalValues=Gesamtwerte anzeigen
699701

700702
defaultRegion=Voreingestellte Bundesländer
701703
defaultDistrict=Voreingestellter Landkreis

sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/campaigns/CampaignDashboardDiagramComponent.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramDataDto;
55
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramDefinitionDto;
66
import de.symeda.sormas.api.campaign.diagram.CampaignDiagramSeries;
7+
import de.symeda.sormas.api.i18n.Captions;
8+
import de.symeda.sormas.api.i18n.I18nProperties;
79
import de.symeda.sormas.ui.highcharts.HighChart;
810

911
import java.math.BigDecimal;
@@ -89,7 +91,11 @@ public void buildDiagramChart(String title) {
8991
if (totalValues != null) {
9092
hcjs.append(
9193
" menuItemDefinitions: { togglePercentages: { onclick: function() { window.changeDiagramState_" + diagramDefinition.getDiagramId()
92-
+ "(); }, text: '" + (showPercentage ? "Show total values" : "Show percentages") + "' } }, ");
94+
+ "(); }, text: '"
95+
+ (showPercentage
96+
? I18nProperties.getCaption(Captions.dashboardShowTotalValues)
97+
: I18nProperties.getCaption(Captions.dashboardShowPercentageValues))
98+
+ "' } }, ");
9399
}
94100

95101
hcjs.append(" buttons:{ contextButton:{ theme:{ fill: 'transparent' }");
@@ -143,7 +149,8 @@ public void buildDiagramChart(String title) {
143149
hcjs.append("column: { stacking: 'normal'}");
144150
}
145151
if (showPercentage && totalValues != null) {
146-
hcjs.append(stackMap.size() > 0 ? ", " : "").append("series: { dataLabels: { enabled: true, format: '{y} %'}}");
152+
hcjs.append(stackMap.size() > 0 ? ", " : "")
153+
.append("series: { dataLabels: { enabled: true, format: '{y} %', style: { fontSize: 14 + 'px' }}}");
147154
}
148155

149156
hcjs.append("},");

0 commit comments

Comments
 (0)