Skip to content
Snippets Groups Projects
Commit 2cc8e4ca authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Classification chart

parent 684983da
No related branches found
No related tags found
No related merge requests found
...@@ -152,6 +152,10 @@ ...@@ -152,6 +152,10 @@
<mandatory v="true" /> <mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/Classification_entity/entityfields/scoretype/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
<entityField>
<name>GroupScore</name>
<valueProcess>%aditoprj%/entity/Classification_entity/entityfields/groupscore/valueProcess.js</valueProcess>
</entityField>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<jDitoRecordContainer> <jDitoRecordContainer>
......
...@@ -5,13 +5,7 @@ import("system.vars"); ...@@ -5,13 +5,7 @@ import("system.vars");
if (vars.getString("$field.CLASSIFICATIONGROUP")) if (vars.getString("$field.CLASSIFICATIONGROUP"))
{ {
var score = JSON.parse(vars.getString("$field.SCORE_RESULTS"))[vars.getString("$field.CLASSIFICATIONGROUP")]; var score = vars.getString("$field.GroupScore");
if (!score)
score = 0;
else
score = parseInt(score);
result.string(translate.text(vars.get("$this.value")) + ": " + score + " " + translate.text("points") + " = " + ClassificationUtils.mapToClass(score)); result.string(translate.text(vars.get("$this.value")) + ": " + score + " " + translate.text("points") + " = " + ClassificationUtils.mapToClass(score));
} }
import("system.vars");
import("system.result");
import("system.result");
if (vars.getString("$field.SCORE_RESULTS"))
{
var score = JSON.parse(vars.getString("$field.SCORE_RESULTS"))[vars.getString("$field.CLASSIFICATIONGROUP")];
if (!score)
score = 0;
else
score = parseInt(score);
result.string(score);
}
...@@ -18,5 +18,9 @@ ...@@ -18,5 +18,9 @@
<name>cabdb49c-4faf-4581-8bb5-8a409f27ac3f</name> <name>cabdb49c-4faf-4581-8bb5-8a409f27ac3f</name>
<view>ClassificationDrawer_view</view> <view>ClassificationDrawer_view</view>
</neonViewReference> </neonViewReference>
<neonViewReference>
<name>4e367ebf-3da3-4252-949c-a5793fd15384</name>
<view>ClassificationChart_view</view>
</neonViewReference>
</references> </references>
</neonContext> </neonContext>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>ClassificationChart_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<multiDataChartViewTemplate>
<name>classificationPoints</name>
<xAxis>CLASSIFICATIONGROUP</xAxis>
<yAxis>GroupScore</yAxis>
<entityField>#ENTITY</entityField>
</multiDataChartViewTemplate>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>SalesprojectClassScoreAttribute_view</name> <name>SalesprojectClassScoreAttribute_view</name>
<title>Classification</title> <title>Classification</title>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<layout> <layout>
<noneLayout> <boxLayout>
<name>layout</name> <name>layout</name>
</noneLayout> <direction>HORIZONTAL</direction>
</layout> </boxLayout>
<children> </layout>
<scoreCardViewTemplate> <children>
<name>ClassificationScore</name> <neonViewReference>
<entityField>#ENTITY</entityField> <name>1af0e58c-db49-41c3-b7ce-d69498070699</name>
<title>Classification score</title> <entityField>#ENTITY</entityField>
<fields> <view>SalesprojectClassificationAttribute_view</view>
<entityFieldLink> </neonViewReference>
<name>14afcf9d-d168-4962-8503-8d590b994b62</name> <neonViewReference>
<entityField>ClassificationResult</entityField> <name>0749fbaf-a18e-49c4-92ba-1811578ec411</name>
</entityFieldLink> <entityField>Classifications</entityField>
</fields> <view>ClassificationChart_view</view>
</scoreCardViewTemplate> </neonViewReference>
<neonViewReference> </children>
<name>1af0e58c-db49-41c3-b7ce-d69498070699</name> </neonView>
<entityField>#ENTITY</entityField>
<view>SalesprojectClassificationAttribute_view</view>
</neonViewReference>
</children>
</neonView>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment