@baravak/risloo-profile-cli 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/push.yml +14 -0
- package/.prettierrc +16 -0
- package/.yarn/releases/yarn-1.22.19.cjs +147529 -0
- package/.yarnrc.yml +1 -0
- package/README.md +98 -0
- package/bin/risloo.js +9 -0
- package/package.json +44 -0
- package/src/Gift.js +29 -0
- package/src/Profile.js +405 -0
- package/src/cli-commands/Executor.js +118 -0
- package/src/cli-commands/ExtractExecutor.js +194 -0
- package/src/cli-commands/GiftExecutor.js +56 -0
- package/src/cli-commands/utilities/BaseOps.js +71 -0
- package/src/cli-commands/utilities/Benchmarker.js +88 -0
- package/src/cli-commands/utilities/CustomErrors.js +14 -0
- package/src/cli-commands/utilities/Response.js +59 -0
- package/src/cli-commands/utilities/STATUSES.js +16 -0
- package/src/cli-commands/utilities/Status.js +9 -0
- package/src/cli.js +125 -0
- package/src/handlebars/helpers/abs.js +8 -0
- package/src/handlebars/helpers/addCommas.js +8 -0
- package/src/handlebars/helpers/array.js +8 -0
- package/src/handlebars/helpers/assignGlobal.js +9 -0
- package/src/handlebars/helpers/boolean.js +19 -0
- package/src/handlebars/helpers/ceil.js +8 -0
- package/src/handlebars/helpers/concat.js +8 -0
- package/src/handlebars/helpers/cos.js +8 -0
- package/src/handlebars/helpers/displacePoint.js +11 -0
- package/src/handlebars/helpers/ellipsisChars.js +10 -0
- package/src/handlebars/helpers/ellipsisLines.js +11 -0
- package/src/handlebars/helpers/first.js +11 -0
- package/src/handlebars/helpers/floor.js +8 -0
- package/src/handlebars/helpers/forLoop.js +15 -0
- package/src/handlebars/helpers/getArrOfProp.js +8 -0
- package/src/handlebars/helpers/isArray.js +8 -0
- package/src/handlebars/helpers/join.js +10 -0
- package/src/handlebars/helpers/last.js +11 -0
- package/src/handlebars/helpers/lineWrap.js +28 -0
- package/src/handlebars/helpers/math.js +24 -0
- package/src/handlebars/helpers/modulo.js +8 -0
- package/src/handlebars/helpers/normalizeAngle.js +7 -0
- package/src/handlebars/helpers/object.js +8 -0
- package/src/handlebars/helpers/objectEntries.js +8 -0
- package/src/handlebars/helpers/polarToCartesian.js +14 -0
- package/src/handlebars/helpers/prepend.js +10 -0
- package/src/handlebars/helpers/profiles/bar.js +45 -0
- package/src/handlebars/helpers/profiles/calcGaugeSidePoints.js +34 -0
- package/src/handlebars/helpers/profiles/gauge.js +61 -0
- package/src/handlebars/helpers/profiles/polygon.js +40 -0
- package/src/handlebars/helpers/reverse.js +9 -0
- package/src/handlebars/helpers/roundToTwo.js +8 -0
- package/src/handlebars/helpers/setVar.js +8 -0
- package/src/handlebars/helpers/sin.js +8 -0
- package/src/handlebars/helpers/split.js +8 -0
- package/src/handlebars/helpers/tan.js +8 -0
- package/src/handlebars/helpers/ternary.js +9 -0
- package/src/handlebars/helpers/toDeg.js +8 -0
- package/src/handlebars/helpers/toRad.js +8 -0
- package/src/handlebars/helpers/withGroup.js +20 -0
- package/src/handlebars/helpers/wrapOnNewline.js +11 -0
- package/src/handlebars/helpers.js +86 -0
- package/src/handlebars/importPartials.js +40 -0
- package/src/handlebars/init.js +15 -0
- package/src/publish/bot.js +91 -0
- package/src/publish/json/gift/gift.json +16 -0
- package/src/publish/json/profiles/16PF93.json +201 -0
- package/src/publish/json/profiles/AEQ93.json +96 -0
- package/src/publish/json/profiles/AMS93.json +102 -0
- package/src/publish/json/profiles/AMS9A.json +102 -0
- package/src/publish/json/profiles/BAOMEIS93.json +99 -0
- package/src/publish/json/profiles/BEQI93.json +1589 -0
- package/src/publish/json/profiles/CAATS93.json +11355 -0
- package/src/publish/json/profiles/CADS93.json +351 -0
- package/src/publish/json/profiles/CARSP93.json +96 -0
- package/src/publish/json/profiles/CERQ93.json +106 -0
- package/src/publish/json/profiles/CRAAS93.json +98 -0
- package/src/publish/json/profiles/CSI93.json +143 -0
- package/src/publish/json/profiles/DSWLS93.json +93 -0
- package/src/publish/json/profiles/EMSS93.json +116 -0
- package/src/publish/json/profiles/FACES93.json +106 -0
- package/src/publish/json/profiles/FTEPT93.json +102 -0
- package/src/publish/json/profiles/GMIT93.json +98 -0
- package/src/publish/json/profiles/HPL93.json +102 -0
- package/src/publish/json/profiles/IBT93.json +106 -0
- package/src/publish/json/profiles/IUS93.json +93 -0
- package/src/publish/json/profiles/JCSI93.json +102 -0
- package/src/publish/json/profiles/JPFQ93.json +1 -0
- package/src/publish/json/profiles/KJGI93.json +100 -0
- package/src/publish/json/profiles/LMIQ93.json +109 -0
- package/src/publish/json/profiles/MMFAD93.json +103 -0
- package/src/publish/json/profiles/MMFAD9A.json +103 -0
- package/src/publish/json/profiles/MOCI93.json +100 -0
- package/src/publish/json/profiles/OBQ4493.json +96 -0
- package/src/publish/json/profiles/PIES93.json +104 -0
- package/src/publish/json/profiles/PIES9A.json +104 -0
- package/src/publish/json/profiles/PMCIEF93.json +1 -0
- package/src/publish/json/profiles/PSWQ93.json +97 -0
- package/src/publish/json/profiles/RIASEC93.json +2511 -0
- package/src/publish/json/profiles/SAFE93.json +110 -0
- package/src/publish/json/profiles/SASQ93.json +92 -0
- package/src/publish/json/profiles/SCASP93.json +611 -0
- package/src/publish/json/profiles/SDCAQ93.json +96 -0
- package/src/publish/json/profiles/STAIY93.json +98 -0
- package/src/publish/json/profiles/WAQ93.json +100 -0
- package/src/publish/json/profiles/YBOCS93.json +1322 -0
- package/src/publish/json/profiles/empty.json +139 -0
- package/src/publish/new-version.hbs +11 -0
- package/src/publish/test.js +109 -0
- package/src/qrcode/qrCodeGenerator.js +14 -0
- package/src/qrcode/qrRender.js +229 -0
- package/src/samples/16PF93.js +158 -0
- package/src/samples/AEQ93.js +121 -0
- package/src/samples/AMS93.js +139 -0
- package/src/samples/AMS9A.js +9 -0
- package/src/samples/BAOMEIS93.js +146 -0
- package/src/samples/BEQI93.js +255 -0
- package/src/samples/CAATS93.js +218 -0
- package/src/samples/CADS93.js +161 -0
- package/src/samples/CARSP93.js +134 -0
- package/src/samples/CERQ93.js +195 -0
- package/src/samples/CRAAS93.js +141 -0
- package/src/samples/CSI93.js +315 -0
- package/src/samples/DSWLS93.js +112 -0
- package/src/samples/EMSS93.js +178 -0
- package/src/samples/FACES93.js +225 -0
- package/src/samples/FTEPT93.js +167 -0
- package/src/samples/GMIT93.js +142 -0
- package/src/samples/HPL93.js +132 -0
- package/src/samples/IBT93.js +99 -0
- package/src/samples/IUS93.js +204 -0
- package/src/samples/JCSI93.js +174 -0
- package/src/samples/JPFQ93.js +74 -0
- package/src/samples/KJGI93.js +136 -0
- package/src/samples/LMIQ93.js +188 -0
- package/src/samples/MMFAD93.js +135 -0
- package/src/samples/MMFAD9A.js +31 -0
- package/src/samples/MOCI93.js +128 -0
- package/src/samples/OBQ4493.js +132 -0
- package/src/samples/PIES93.js +228 -0
- package/src/samples/PIES9A.js +32 -0
- package/src/samples/PMCIEF93.js +64 -0
- package/src/samples/PSWQ93.js +126 -0
- package/src/samples/RIASEC93.js +144 -0
- package/src/samples/SAFE93.js +64 -0
- package/src/samples/SASQ93.js +130 -0
- package/src/samples/SCASP93.js +207 -0
- package/src/samples/SDCAQ93.js +174 -0
- package/src/samples/STAIY93.js +159 -0
- package/src/samples/WAQ93.js +208 -0
- package/src/samples/YBOCS93.js +583 -0
- package/src/samples/empty.js +53 -0
- package/views/gift.hbs +160 -0
- package/views/profiles/fonts.css +18 -0
- package/views/profiles/layout.hbs +27 -0
- package/views/profiles/samples/16PF93.hbs +54 -0
- package/views/profiles/samples/AEQ93.hbs +31 -0
- package/views/profiles/samples/AMS93.hbs +97 -0
- package/views/profiles/samples/AMS9A.hbs +1 -0
- package/views/profiles/samples/BAOMEIS93.hbs +48 -0
- package/views/profiles/samples/BEQI93.hbs +118 -0
- package/views/profiles/samples/CAATS93.hbs +251 -0
- package/views/profiles/samples/CADS93.hbs +104 -0
- package/views/profiles/samples/CARSP93.hbs +26 -0
- package/views/profiles/samples/CERQ93.hbs +115 -0
- package/views/profiles/samples/CRAAS93.hbs +88 -0
- package/views/profiles/samples/CSI93_1.hbs +110 -0
- package/views/profiles/samples/CSI93_2.hbs +76 -0
- package/views/profiles/samples/DSWLS93.hbs +26 -0
- package/views/profiles/samples/EMSS93.hbs +101 -0
- package/views/profiles/samples/FACES93_1.hbs +107 -0
- package/views/profiles/samples/FACES93_2.hbs +51 -0
- package/views/profiles/samples/FTEPT93.hbs +67 -0
- package/views/profiles/samples/GMIT93.hbs +45 -0
- package/views/profiles/samples/HPL93.hbs +36 -0
- package/views/profiles/samples/IBT93.hbs +67 -0
- package/views/profiles/samples/IUS93.hbs +123 -0
- package/views/profiles/samples/JCSI93.hbs +65 -0
- package/views/profiles/samples/JPFQ93.hbs +44 -0
- package/views/profiles/samples/KJGI93.hbs +57 -0
- package/views/profiles/samples/LMIQ93.hbs +82 -0
- package/views/profiles/samples/MMFAD93.hbs +35 -0
- package/views/profiles/samples/MMFAD9A.hbs +1 -0
- package/views/profiles/samples/MOCI93.hbs +60 -0
- package/views/profiles/samples/OBQ4493.hbs +61 -0
- package/views/profiles/samples/PIES93.hbs +67 -0
- package/views/profiles/samples/PIES9A.hbs +1 -0
- package/views/profiles/samples/PMCIEF93.hbs +8 -0
- package/views/profiles/samples/PSWQ93.hbs +32 -0
- package/views/profiles/samples/RIASEC93.hbs +38 -0
- package/views/profiles/samples/SAFE93.hbs +118 -0
- package/views/profiles/samples/SASQ93.hbs +45 -0
- package/views/profiles/samples/SCASP93.hbs +94 -0
- package/views/profiles/samples/SDCAQ93.hbs +68 -0
- package/views/profiles/samples/STAIY93.hbs +67 -0
- package/views/profiles/samples/WAQ93.hbs +74 -0
- package/views/profiles/samples/YBOCS93_1.hbs +96 -0
- package/views/profiles/samples/YBOCS93_2.hbs +115 -0
- package/views/profiles/samples/YBOCS93_3.hbs +93 -0
- package/views/profiles/samples/empty.hbs +10 -0
- package/views/profiles/sidebar.hbs +193 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="horizontal-shadow">
|
|
5
|
+
<stop offset="0%" stop-color="black" />
|
|
6
|
+
<stop offset="100%" stop-color="transparent" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="vertical-shadow" gradientTransform="rotate(90)">
|
|
9
|
+
<stop offset="0%" stop-color="transparent" />
|
|
10
|
+
<stop offset="100%" stop-color="black" />
|
|
11
|
+
</linearGradient>
|
|
12
|
+
</defs>
|
|
13
|
+
|
|
14
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
15
|
+
{{!-- <rect x="0" y="0" width="702" height="450" fill="#E2E8F0"/> --}}
|
|
16
|
+
{{#each dataset.score}}
|
|
17
|
+
<g transform="translate(0, {{math 5 '+' ( math 51 '*' @key )}})">
|
|
18
|
+
<text y="0" x="129" dominant-baseline="hanging" text-anchor="start" font-size="18px" font-weight="400">{{label.fr}}</text>
|
|
19
|
+
<g transform="translate(147, 0)">
|
|
20
|
+
{{bar (math label.width '*' 4.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.background opacity='.8'}}
|
|
21
|
+
{{bar (math mark '*' 4.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.fill opacity='.8'}}
|
|
22
|
+
<text y="17" x="{{math (math label.width '*' 4.5) '+' 7.5 }}" dominant-baseline="middle" text-anchor="start" font-size="24px" fill="{{label.fill}}" font-weight="500" direction="ltr">
|
|
23
|
+
{{mark}}
|
|
24
|
+
<tspan font-size="18px" fill="#D4D4D8" font-weight="400">/ {{label.width}}</tspan>
|
|
25
|
+
</text>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
{{/each}}
|
|
29
|
+
<g transform="translate(642.5, 428)">
|
|
30
|
+
<g transform="translate(9, 0)">
|
|
31
|
+
{{bar 9 378 (object tl=0 tr=0 bl=4.5 br=4.5) (toRad 180) fill='#E4E4E7'}}
|
|
32
|
+
{{bar 9 markSum (object tl=0 tr=0 bl=4.5 br=4.5) (toRad 180) fill='#52525B'}}
|
|
33
|
+
</g>
|
|
34
|
+
<text x="4.5" y="-387" dominant-baseline="auto" text-anchor="middle" fill="#A1A1AA" font-size="18px" font-weight="400">378</text>
|
|
35
|
+
<text x="21" y="{{math markSum '*' -1}}" dominant-baseline="middle" text-anchor="start" font-size="24px" fill="#3F3F46" font-weight="500" direction="ltr">{{markSum}}</text>
|
|
36
|
+
<text transform="rotate(-90, 0, 0)" x="-3" y="-28" dominant-baseline="hanging" text-anchor="end" font-size="18px" font-weight="400">نمره کل</text>
|
|
37
|
+
|
|
38
|
+
<rect x="-3" y="0" width="15" height="3" fill="#FFFFFF" style="filter: drop-shadow(0 -3px 5px rgba(0,0,0, .5));"/>
|
|
39
|
+
</g>
|
|
40
|
+
<g transform="translate(144.5, 0)">
|
|
41
|
+
<rect x="0" y="0" width="3" height="450" rx="1" fill="#FFFFFF" style="filter: drop-shadow(3px 0 5px rgba(0,0,0, .5));"/>
|
|
42
|
+
</g>
|
|
43
|
+
</g>
|
|
44
|
+
{{/ layout}}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<radialGradient id="blueGradient">
|
|
5
|
+
<stop offset="0%" stop-color="#007BA4" stop-opacity="0.75" />
|
|
6
|
+
<stop offset="99.99%" stop-color="#007BA4" stop-opacity="0" />
|
|
7
|
+
<stop offset="100%" stop-color="#007BA4" stop-opacity="0" />
|
|
8
|
+
</radialGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
|
|
11
|
+
<g transform="translate(0, {{spec.profile.padding.y}})">
|
|
12
|
+
<g transform="translate({{math spec.profile.dimensions.width '/' 2}}, 0)">
|
|
13
|
+
<g transform="translate(0, {{spec.raw.maxRadius}})">
|
|
14
|
+
<circle cx="0" cy="0" r="{{raw.radius}}" fill="url('#blueGradient')" />
|
|
15
|
+
<text x="0" y="0" fill="#111827" font-size="48" text-anchor="middle" dy="10">{{raw.mark}}</text>
|
|
16
|
+
</g>
|
|
17
|
+
<g
|
|
18
|
+
transform="translate(0, {{math (math spec.raw.maxRadius '*' 2) '+' spec.interpretRects.offsetY1}})"
|
|
19
|
+
font-size="16">
|
|
20
|
+
{{#each spec.interpretRects.labels as |label index|}}
|
|
21
|
+
<g transform="translate({{math @root.spec.interpretRects.distanceX '*' (math index '-' 1)}}, 0)">
|
|
22
|
+
<rect
|
|
23
|
+
x="0"
|
|
24
|
+
y="0"
|
|
25
|
+
width="{{@root.spec.interpretRects.width}}"
|
|
26
|
+
height="{{@root.spec.interpretRects.height}}"
|
|
27
|
+
transform="translate(-{{math @root.spec.interpretRects.width '/' 2}}, -{{math @root.spec.interpretRects.height '/' 2}})"
|
|
28
|
+
fill="{{ternary (boolean label.eng '==' @root.interpret) '#007BA4' '#F9FAFB'}}"
|
|
29
|
+
rx="{{@root.spec.interpretRects.borderRadius}}" />
|
|
30
|
+
<text
|
|
31
|
+
x="0"
|
|
32
|
+
y="0"
|
|
33
|
+
text-anchor="middle"
|
|
34
|
+
dy="5"
|
|
35
|
+
fill="{{ternary (boolean label.eng '==' @root.interpret) 'white' '#6B7280'}}"
|
|
36
|
+
font-weight="{{ternary (boolean label.eng '==' @root.interpret) 'bold' 'normal'}}">
|
|
37
|
+
{{label.fr}}
|
|
38
|
+
</text>
|
|
39
|
+
</g>
|
|
40
|
+
{{/each}}
|
|
41
|
+
</g>
|
|
42
|
+
<g transform="translate(0, {{math (math (math (math (math spec.raw.maxRadius '*' 2) '+' spec.interpretRects.offsetY1) '+' spec.interpretRects.height) '+' spec.interpretRects.offsetY2) '+' spec.items.maxRadius}})"
|
|
43
|
+
font-size="32">
|
|
44
|
+
{{#each items as |item index|}}
|
|
45
|
+
<g transform="translate({{math @root.spec.items.distance.x '*' (math index '-' 1)}}, 0)">
|
|
46
|
+
<circle cx="0" cy="0" r="{{item.radius}}" fill="url('#blueGradient')" />
|
|
47
|
+
<text x="0" y="0" fill="#111827" text-anchor="middle" dy="10">{{item.mark}}</text>
|
|
48
|
+
<text x="0" y="{{@root.spec.items.distance.y}}" fill="#374151" text-anchor="middle" font-size="16" dy="10">
|
|
49
|
+
{{item.label}}
|
|
50
|
+
</text>
|
|
51
|
+
</g>
|
|
52
|
+
{{/each}}
|
|
53
|
+
</g>
|
|
54
|
+
</g>
|
|
55
|
+
</g>
|
|
56
|
+
|
|
57
|
+
{{/layout}}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="horizontal-shadow">
|
|
5
|
+
<stop offset="0%" stop-color="black" />
|
|
6
|
+
<stop offset="100%" stop-color="transparent" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="vertical-shadow" gradientTransform="rotate(90)">
|
|
9
|
+
<stop offset="0%" stop-color="black" />
|
|
10
|
+
<stop offset="100%" stop-color="transparent" />
|
|
11
|
+
</linearGradient>
|
|
12
|
+
</defs>
|
|
13
|
+
|
|
14
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
15
|
+
<g transform="translate({{spec.items.offsetX}}, 0)">
|
|
16
|
+
{{setVar "tickTotalHeight" (math (math (math spec.items.ticks.heightOffset '+' spec.items.totalHeights.[0]) '+' spec.items.offsetY2) '+' spec.items.totalHeights.[1])}}
|
|
17
|
+
{{#each itemsTicks as | tick index |}}
|
|
18
|
+
<g transform="translate({{tick.leftPos}}, 0)">
|
|
19
|
+
<line x1="0" y1="0" x2="0" y2="{{../tickTotalHeight}}" stroke="#E4E4E7" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="2"/>
|
|
20
|
+
<text x="-{{@root.spec.items.ticks.numberOffset.x}}" y="{{@root.spec.items.ticks.numberOffset.y}}" fill="#A1A1AA" text-anchor="start" font-size="16" font-weight="500" dy="5">{{tick.number}}</text>
|
|
21
|
+
</g>
|
|
22
|
+
{{/each}}
|
|
23
|
+
</g>
|
|
24
|
+
<g transform="translate(0, {{spec.items.ticks.heightOffset}})">
|
|
25
|
+
<g transform="translate({{spec.items.offsetX}}, 0)">
|
|
26
|
+
{{#each items.[0] as | item index |}}
|
|
27
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
28
|
+
<g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
|
|
29
|
+
<path d="M 0 0 h {{math item.width '-' itemsSpec.rect.borderRadius}} a {{itemsSpec.rect.borderRadius}} {{itemsSpec.rect.borderRadius}} 180 0 1 0 {{itemsSpec.rect.height}} h -{{math item.width '-' itemsSpec.rect.borderRadius}} z" fill="{{item.fill}}" fill-opacity="{{item.opacity}}"/>
|
|
30
|
+
<g transform="translate(0, {{itemsSpec.rect.borderRadius}})">
|
|
31
|
+
<text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="14" font-weight="400" dy="3">{{item.label.fr}}</text>
|
|
32
|
+
<text x="{{math (math item.width '-' itemsSpec.rect.borderRadius) '-' 10}}" y="0" fill="white" text-anchor="middle" font-size="18" font-weight="600" dy="6">{{item.mark}}</text>
|
|
33
|
+
</g>
|
|
34
|
+
</g>
|
|
35
|
+
{{/with}}
|
|
36
|
+
{{/each}}
|
|
37
|
+
|
|
38
|
+
<g transform="translate(-1, -1)">
|
|
39
|
+
<rect x="0" y="0" width="1" height="{{math (math spec.items.totalHeights.[0] '+' spec.items.totalHeights.[1]) '+' 2}}" fill="#FFFFFF" rx="1"/>
|
|
40
|
+
<rect x="1" y="0" width="5" height="{{math (math spec.items.totalHeights.[0] '+' spec.items.totalHeights.[1]) '+' 2}}" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
|
|
41
|
+
</g>
|
|
42
|
+
</g>
|
|
43
|
+
|
|
44
|
+
{{setVar "rawLeftPos" (math (math spec.items.offsetX '+' (math spec.items.maxValue '*' spec.items.widthCoeff)) '+' spec.raw.offsetX)}}
|
|
45
|
+
<g transform="translate({{rawLeftPos}}, {{spec.items.totalHeights.[0]}})">
|
|
46
|
+
<path d="M 0 0 v -{{math (math spec.raw.heightCoeff '*' spec.raw.maxValue) '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math (math spec.raw.heightCoeff '*' spec.raw.maxValue) '-' spec.raw.rect.borderRadius}} z" fill="#F4F4F5"/>
|
|
47
|
+
<path d="M 0 0 v -{{math raw.height '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math raw.height '-' spec.raw.rect.borderRadius}} z" fill="#52525B"/>
|
|
48
|
+
<text x="{{spec.raw.rect.borderRadius}}" y="-{{math raw.height '-' spec.raw.rect.borderRadius}}" text-anchor="middle" font-size="20" font-weight="700" fill="white" dy="6" transform="translate(0, 10)">{{raw.mark}}</text>
|
|
49
|
+
<text x="0" y="-22" text-anchor="end" font--size="18" font-weight="500" fill="#71717A" dy="5" transform="rotate(-90)">نمره کل</text>
|
|
50
|
+
<g transform="scale(1, -1)">
|
|
51
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="1" fill="#FFFFFF" rx="1"/>
|
|
52
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="5" fill="url('#vertical-shadow')" fill-opacity="0.2"/>
|
|
53
|
+
</g>
|
|
54
|
+
|
|
55
|
+
<g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
|
|
56
|
+
{{#each rawTicks as | tick index |}}
|
|
57
|
+
<line x1="0" y1="-{{tick.bottomPos}}" x2="{{@root.spec.raw.ticks.line.width}}" y2="-{{tick.bottomPos}}" stroke="#E4E4E7" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
|
|
58
|
+
<g transform="translate({{math @root.spec.raw.ticks.line.width '+' @root.spec.raw.ticks.number.offsetX}}, -{{tick.bottomPos}})">
|
|
59
|
+
<text x="0" y="0" fill="#A1A1AA" text-anchor="end" font-size="14" font-weight="500" dy="4">{{tick.number}}</text>
|
|
60
|
+
</g>
|
|
61
|
+
{{/each}}
|
|
62
|
+
</g>
|
|
63
|
+
</g>
|
|
64
|
+
</g>
|
|
65
|
+
<g transform="translate(0, {{math (math spec.items.ticks.heightOffset '+' spec.items.totalHeights.[0]) '+' spec.items.offsetY2}})">
|
|
66
|
+
<g transform="translate({{spec.items.offsetX}}, 0)">
|
|
67
|
+
{{#each items.[1] as | item index |}}
|
|
68
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
69
|
+
<g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
|
|
70
|
+
<path d="M 0 0 h {{math item.width '-' itemsSpec.rect.borderRadius}} a {{itemsSpec.rect.borderRadius}} {{itemsSpec.rect.borderRadius}} 180 0 1 0 {{itemsSpec.rect.height}} h -{{math item.width '-' itemsSpec.rect.borderRadius}} z" fill="{{item.fill}}" fill-opacity="{{item.opacity}}"/>
|
|
71
|
+
<g transform="translate(0, {{itemsSpec.rect.borderRadius}})">
|
|
72
|
+
<text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="16" font-weight="500" dy="3">{{item.label.fr}} <tspan fill="#71717A" font-size="14" font-weight="400">({{item.overallMark.mark}} از {{item.overallMark.maxValue}})</tspan></text>
|
|
73
|
+
<text x="{{math (math item.width '-' itemsSpec.rect.borderRadius) '-' 10}}" y="0" fill="white" text-anchor="middle" font-size="18" font-weight="600" dy="6">{{item.mark}}</text>
|
|
74
|
+
</g>
|
|
75
|
+
</g>
|
|
76
|
+
{{/with}}
|
|
77
|
+
{{/each}}
|
|
78
|
+
</g>
|
|
79
|
+
</g>
|
|
80
|
+
</g>
|
|
81
|
+
|
|
82
|
+
{{/layout}}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
4
|
+
<g transform="translate(346, 342)">
|
|
5
|
+
<g fill="none" stroke="#D4D4D8">
|
|
6
|
+
{{polygon spec.polygons.n spec.polygons.radius spec.polygons.startAngle}}
|
|
7
|
+
{{polygon spec.polygons.n spec.polygons.centerOffset spec.polygons.startAngle}}
|
|
8
|
+
</g>
|
|
9
|
+
<g fill="#007BA4" fill-opacity="0.1" stroke="#007BA4" stroke-width="2">
|
|
10
|
+
{{polygon spec.polygons.n (getArrOfProp items 'radius') spec.polygons.startAngle}}
|
|
11
|
+
</g>
|
|
12
|
+
<text x="0" y="-{{spec.raw.mark.paddingY}}" font-size="12" font-weight="400" fill="#71717A" text-anchor="middle" dy="3">{{raw.label.fr}} از {{spec.raw.maxValue}}</text>
|
|
13
|
+
<text x="0" y="+{{spec.raw.mark.paddingY}}" font-size="30" font-weight="600" fill="#27272A" text-anchor="middle" dy="8">{{raw.mark}}</text>
|
|
14
|
+
<g>
|
|
15
|
+
{{assignGlobal "labelOffset" (array 0 0 15 0 0 25 0)}}
|
|
16
|
+
{{#each items as |item index|}}
|
|
17
|
+
{{setVar "p1" (polarToCartesian @root.spec.polygons.radius item.angle)}}
|
|
18
|
+
{{setVar "p2" (polarToCartesian @root.spec.polygons.centerOffset item.angle)}}
|
|
19
|
+
<line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="{{item.fill}}" stroke-dasharray="5"/>
|
|
20
|
+
{{setVar "point" (polarToCartesian item.radius item.angle)}}
|
|
21
|
+
<g transform="translate({{point.x}}, {{point.y}})" fill="white">
|
|
22
|
+
<circle cx="0" cy="0" r="{{@root.spec.items.dataPoints.radius}}" stroke="{{item.fill}}" stroke-width="1"/>
|
|
23
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="{{item.fill}}" text-anchor="middle" dy="3">{{item.mark}}</text>
|
|
24
|
+
</g>
|
|
25
|
+
{{setVar "point" (polarToCartesian (math (math @root.spec.polygons.radius '+' @root.spec.items.labels.offset) '+' (lookup @root.labelOffset index)) item.angle)}}
|
|
26
|
+
<g transform="translate({{point.x}}, {{point.y}})">
|
|
27
|
+
<text x="0" y="0" transform="translate(0, -{{@root.spec.items.labels.paddingY}})" font-size="16" font-weight="400" fill="{{item.fill}}" text-anchor="middle" dy="5">{{item.label.fr}}</text>
|
|
28
|
+
<text x="0" y="0" transform="translate(0, +{{@root.spec.items.labels.paddingY}})" font-size="12" font-weight="400" fill="#A1A1AA" text-anchor="middle" dy="5">از {{item.maxValue}}</text>
|
|
29
|
+
</g>
|
|
30
|
+
{{/each}}
|
|
31
|
+
</g>
|
|
32
|
+
</g>
|
|
33
|
+
</g>
|
|
34
|
+
|
|
35
|
+
{{/layout}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{> MMFAD93}}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
4
|
+
<g transform="translate(0, {{math (math (math spec.raw.maxValue '/' spec.raw.step) '*' spec.raw.rect.distanceY) '-' spec.raw.rect.offsetY}}) scale(1, -1)">
|
|
5
|
+
{{#each items as |item index|}}
|
|
6
|
+
<g transform="translate({{math @root.spec.items.distanceX '*' index}}, 0)">
|
|
7
|
+
<text x="0" y="0" text-anchor="start" fill="{{item.fill}}" transform="translate({{math (math @root.spec.items.rect.width '/' 2) '+' 5}}, -25) rotate(45) scale(1, -1)" xml:space="preserve"><tspan font-size="18">{{item.label.fr}}</tspan><tspan font-size="14"> ({{item.label.abbr}})</tspan></text>
|
|
8
|
+
<g>
|
|
9
|
+
<g fill="{{@root.spec.items.rect.defaultColor}}">
|
|
10
|
+
{{#forLoop 1 (math (math item.maxValue '/' @root.spec.items.step) '+' 1) 1 }}
|
|
11
|
+
<rect x="0" y="{{math @root.spec.items.rect.distanceY '*' (math @i '-' 1)}}" width="{{@root.spec.items.rect.width}}" height="{{@root.spec.items.rect.height}}"/>
|
|
12
|
+
{{#if @last}}
|
|
13
|
+
<g transform="translate({{math @root.spec.items.rect.width '/' 2}}, {{math (math @root.spec.items.rect.distanceY '*' (math @i '-' 1)) '+' (math @root.spec.items.rect.height '/' 2)}})">
|
|
14
|
+
<text x="0" y="0" font-size="18" font-weight="500" fill="#D1D5DB" text-anchor="middle" dy="5.5" transform="scale(1, -1)">{{item.maxValue}}</text>
|
|
15
|
+
</g>
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{/forLoop}}
|
|
18
|
+
</g>
|
|
19
|
+
<g fill="{{item.fill}}">
|
|
20
|
+
{{#forLoop 1 (ceil (math (math item.mark '/' @root.spec.items.step) '+' 1)) 1 }}
|
|
21
|
+
<rect x="0" y="{{math @root.spec.items.rect.distanceY '*' (math @i '-' 1)}}" width="{{@root.spec.items.rect.width}}" height="{{@root.spec.items.rect.height}}" fill-opacity="{{math (math (math (math (math 0.5 '/' (math (math item.maxValue '/' @root.spec.items.step) '-' 1)) '*' (math @i '-' 1)) '+' 0.5) '*' 100) '/' 100}}"/>
|
|
22
|
+
{{#if @last}}
|
|
23
|
+
<g transform="translate({{math @root.spec.items.rect.width '/' 2}}, {{math (math @root.spec.items.rect.distanceY '*' (math @i '-' 1)) '+' (math @root.spec.items.rect.height '/' 2)}})">
|
|
24
|
+
<text x="0" y="0" font-size="22" font-weight="500" fill="white" text-anchor="middle" dy="8" transform="scale(1, -1)">{{item.mark}}</text>
|
|
25
|
+
</g>
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{/forLoop}}
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
{{/each}}
|
|
32
|
+
|
|
33
|
+
<g transform="translate({{math (math spec.items.distanceX '*' (math items.length '-' 1)) '+' spec.raw.distanceX}}, 0)">
|
|
34
|
+
<text x="0" y="0" text-anchor="start" fill="{{spec.raw.rect.color}}" transform="translate({{math (math spec.items.rect.width '/' 2) '+' 10}}, -25) rotate(45) scale(1, -1)" xml:space="preserve"><tspan font-size="18">{{raw.label.fr}}</tspan><tspan font-size="14"> ({{raw.label.abbr}})</tspan></text>
|
|
35
|
+
<g>
|
|
36
|
+
<g fill="{{spec.raw.rect.defaultColor}}">
|
|
37
|
+
{{#forLoop 1 (math (math spec.raw.maxValue '/' spec.raw.step) '+' 1) 1 }}
|
|
38
|
+
<rect x="0" y="{{math @root.spec.raw.rect.distanceY '*' (math @i '-' 1)}}" width="{{@root.spec.raw.rect.width}}" height="{{@root.spec.raw.rect.height}}"/>
|
|
39
|
+
{{#if @last}}
|
|
40
|
+
<g transform="translate({{math @root.spec.raw.rect.width '/' 2}}, {{math (math @root.spec.raw.rect.distanceY '*' (math @i '-' 1)) '+' (math @root.spec.raw.rect.height '/' 2)}})">
|
|
41
|
+
<text x="0" y="0" font-size="18" font-weight="500" fill="#D1D5DB" text-anchor="middle" dy="5.5" transform="scale(1, -1)">{{@root.spec.raw.maxValue}}</text>
|
|
42
|
+
</g>
|
|
43
|
+
{{/if}}
|
|
44
|
+
{{/forLoop}}
|
|
45
|
+
</g>
|
|
46
|
+
<g fill="{{spec.raw.rect.color}}">
|
|
47
|
+
{{#forLoop 1 (math (ceil (math raw.mark '/' spec.raw.step)) '+' 1) 1 }}
|
|
48
|
+
<rect x="0" y="{{math @root.spec.raw.rect.distanceY '*' (math @i '-' 1)}}" width="{{@root.spec.raw.rect.width}}" height="{{@root.spec.raw.rect.height}}" fill-opacity="{{math (math (math (math (math 0.5 '/' (math (math @root.spec.raw.maxValue '/' @root.spec.raw.step) '-' 1)) '*' (math @i '-' 1)) '+' 0.5) '*' 100) '/' 100}}"/>
|
|
49
|
+
{{#if @last}}
|
|
50
|
+
<g transform="translate({{math @root.spec.raw.rect.width '/' 2}}, {{math (math @root.spec.raw.rect.distanceY '*' (math @i '-' 1)) '+' (math @root.spec.raw.rect.height '/' 2)}})">
|
|
51
|
+
<text x="0" y="0" font-size="22" font-weight="500" fill="white" text-anchor="middle" dy="8" transform="scale(1, -1)">{{@root.raw.mark}}</text>
|
|
52
|
+
</g>
|
|
53
|
+
{{/if}}
|
|
54
|
+
{{/forLoop}}
|
|
55
|
+
</g>
|
|
56
|
+
</g>
|
|
57
|
+
</g>
|
|
58
|
+
</g>
|
|
59
|
+
</g>
|
|
60
|
+
{{/layout}}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
{{#with spec.items.rect as | rect |}}
|
|
5
|
+
<clipPath id="items-rect">
|
|
6
|
+
{{bar (math rect.width '/' 2) rect.height (object tl=0 tr=rect.br bl=0 br=rect.br) (toRad 0)}}
|
|
7
|
+
</clipPath>
|
|
8
|
+
{{/with}}
|
|
9
|
+
{{#with spec.raw.rect as | rect |}}
|
|
10
|
+
<clipPath id="raw-rect">
|
|
11
|
+
{{bar (math rect.width '/' 2) rect.height (object tl=0 tr=rect.br bl=0 br=rect.br) (toRad 0)}}
|
|
12
|
+
</clipPath>
|
|
13
|
+
{{/with}}
|
|
14
|
+
</defs>
|
|
15
|
+
|
|
16
|
+
<g transform="translate({{math spec.profile.dimensions.width '/' 2}}, {{math spec.profile.padding.y '+' 30}})">
|
|
17
|
+
{{#each items as | item itemIndex |}}
|
|
18
|
+
{{#with @root.spec.items}}
|
|
19
|
+
<g transform="translate(0, {{math itemIndex '*' rect.distanceY}})">
|
|
20
|
+
<rect x="0" y="0" width="{{math rect.width '/' 2}}" height="{{rect.height}}" fill="#F4F4F5" clip-path="url(#items-rect)"/>
|
|
21
|
+
<rect x="0" y="0" width="{{math rect.width '/' 2}}" height="{{rect.height}}" fill="#F4F4F5" transform="scale(-1, 1)" clip-path="url(#items-rect)"/>
|
|
22
|
+
{{setVar "isPositive" (boolean item.mark '>' 0)}}
|
|
23
|
+
<rect x="0" y="0" width="{{item.width}}" height="{{rect.height}}" fill="{{ternary isPositive '#B91C1C' '#007BA4'}}" transform="scale({{ternary isPositive 1 -1}}, 1)" clip-path="url(#items-rect)"/>
|
|
24
|
+
<g transform="translate({{ternary isPositive item.width (math -1 '*' item.width)}}, 0)">
|
|
25
|
+
<line x1="0" y1="-2" x2="0" y2="-8" stroke="{{ternary isPositive '#B91C1C' '#007BA4'}}" stroke-dasharray="2" stroke-linecap="round" stroke-width="1"/>
|
|
26
|
+
<text x="0" y="-20" text-anchor="middle" font-size="16" font-weight="600" fill="{{ternary isPositive '#B91C1C' '#007BA4'}}" dy="5">{{abs item.mark}}{{ternary isPositive '+' '-'}}</text>
|
|
27
|
+
</g>
|
|
28
|
+
<g transform="translate(0, {{math rect.height '/' 2}})">
|
|
29
|
+
<line x1="0" y1="{{math (math rect.height '/' 2) '+' 1}}" x2="0" y2="-{{math (math rect.height '/' 2) '+' 1}}" stroke="#A1A1AA" stroke-dasharray="2.5" stroke-linecap="round" stroke-width="1"/>
|
|
30
|
+
<text x="{{math (math rect.width '/' 2) '+' maxValuesOffsetX}}" y="0" text-anchor="end" font-size="14" font-weight="400" fill="#A1A1AA" dy="4">{{item.maxValue}}+</text>
|
|
31
|
+
<text x="{{math -1 '*' (math (math rect.width '/' 2) '+' maxValuesOffsetX)}}" y="0" text-anchor="start" font-size="14" font-weight="400" fill="#A1A1AA" dy="4">{{item.maxValue}}-</text>
|
|
32
|
+
</g>
|
|
33
|
+
<text x="0" y="{{math rect.height '+' labels.offsetY}}" text-anchor="middle" font-size="14" font-weight="500" fill="#52525B" dy="4">{{item.label.fr}} ({{item.label.abbr}})</text>
|
|
34
|
+
</g>
|
|
35
|
+
{{/with}}
|
|
36
|
+
{{/each}}
|
|
37
|
+
<g transform="translate(0, {{math (math (math (math items.length '-' 1) '*' spec.items.rect.distanceY) '+' spec.items.rect.height) '+' spec.raw.rect.offsetY}})">
|
|
38
|
+
{{#with @root.spec.raw}}
|
|
39
|
+
<rect x="0" y="0" width="{{math rect.width '/' 2}}" height="{{rect.height}}" fill="#F4F4F5" clip-path="url(#raw-rect)"/>
|
|
40
|
+
<rect x="0" y="0" width="{{math rect.width '/' 2}}" height="{{rect.height}}" fill="#F4F4F5" transform="scale(-1, 1)" clip-path="url(#raw-rect)"/>
|
|
41
|
+
{{setVar "isPositive" (boolean ../raw.mark '>' 0)}}
|
|
42
|
+
<rect x="0" y="0" width="{{../raw.width}}" height="{{rect.height}}" fill="{{ternary isPositive '#B91C1C' '#007BA4'}}" transform="scale({{ternary isPositive 1 -1}}, 1)" clip-path="url(#raw-rect)"/>
|
|
43
|
+
<g transform="translate({{ternary isPositive ../raw.width (math -1 '*' ../raw.width)}}, 0)">
|
|
44
|
+
<line x1="0" y1="-2" x2="0" y2="-8" stroke="{{ternary isPositive '#B91C1C' '#007BA4'}}" stroke-dasharray="2" stroke-linecap="round" stroke-width="1"/>
|
|
45
|
+
<text x="0" y="-20" text-anchor="middle" font-size="16" font-weight="600" fill="{{ternary isPositive '#B91C1C' '#007BA4'}}" dy="5">{{abs ../raw.mark}}{{ternary isPositive '+' '-'}}</text>
|
|
46
|
+
</g>
|
|
47
|
+
<g transform="translate(0, {{math rect.height '/' 2}})">
|
|
48
|
+
<line x1="0" y1="{{math (math rect.height '/' 2) '+' 1}}" x2="0" y2="-{{math (math rect.height '/' 2) '+' 1}}" stroke="#A1A1AA" stroke-dasharray="2.5" stroke-linecap="round" stroke-width="1"/>
|
|
49
|
+
<text x="{{math (math rect.width '/' 2) '+' maxValuesOffsetX}}" y="0" text-anchor="end" font-size="14" font-weight="400" fill="#A1A1AA" dy="4">{{../raw.maxValue}}+</text>
|
|
50
|
+
<text x="{{math -1 '*' (math (math rect.width '/' 2) '+' maxValuesOffsetX)}}" y="0" text-anchor="start" font-size="14" font-weight="400" fill="#A1A1AA" dy="4">{{../raw.maxValue}}-</text>
|
|
51
|
+
</g>
|
|
52
|
+
<text x="0" y="{{math rect.height '+' labels.offsetY}}" text-anchor="middle" font-size="14" font-weight="500" fill="#52525B" dy="4">{{../raw.label.fr}} ({{../raw.label.abbr}})</text>
|
|
53
|
+
{{/with}}
|
|
54
|
+
<g transform="translate(0, {{math spec.raw.rect.height '+' spec.separator.line.offsetY}})">
|
|
55
|
+
<line x1="{{math (math -1 '*' spec.separator.line.width) '/' 2}}" y1="0" x2="{{math spec.separator.line.width '/' 2}}" y2="0" stroke="#A1A1AA"/>
|
|
56
|
+
<text x="{{math spec.separator.line.width '/' 2}}" y="{{spec.separator.desc.offsetY}}" fill="#71717A" text-anchor="start" font-size="14" font-weight="400" dy="4">{{spec.desc}}</text>
|
|
57
|
+
</g>
|
|
58
|
+
</g>
|
|
59
|
+
</g>
|
|
60
|
+
|
|
61
|
+
{{/layout}}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="shadow">
|
|
5
|
+
<stop offset="0%" stop-color="black" />
|
|
6
|
+
<stop offset="100%" stop-color="transparent" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
|
|
10
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
11
|
+
<g font-size="20">
|
|
12
|
+
<g transform="translate({{spec.items.base.rect.width}}, 0)">
|
|
13
|
+
{{#each itemsTicks as |tick index|}}
|
|
14
|
+
<line x1="{{tick.leftPos}}" y1="0" x2="{{tick.leftPos}}" y2="{{math ../spec.items.totalHeight '+' (math 2 '*' ../spec.items.ticks.heightOffset)}}" stroke="#E5E7EB" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="2"/>
|
|
15
|
+
<text x="{{math tick.leftPos '-' ../spec.items.ticks.numberOffset.x}}" y="{{../spec.items.ticks.numberOffset.y}}" fill="#9CA3AF" text-anchor="middle" font-size="16" font-weight="500" dy="5">{{tick.number}}</text>
|
|
16
|
+
{{/each}}
|
|
17
|
+
</g>
|
|
18
|
+
<g transform="translate({{spec.items.base.rect.width}}, {{spec.items.ticks.heightOffset}})">
|
|
19
|
+
{{#each items as |item index|}}
|
|
20
|
+
<g transform="translate(0, {{math (math index '*' ../spec.items.distanceY) '+' 1}})">
|
|
21
|
+
{{bar item.width ../spec.items.base.rect.height ../spec.items.body.rect.brs 0 fill=item.body.color fill-opacity=item.body.opacity}}
|
|
22
|
+
<g transform="translate(-{{math (math ../spec.items.base.rect.height '/' 2) '+' 6}}, {{math ../spec.items.base.rect.height '/' 2}})">
|
|
23
|
+
<text x="{{item.width}}" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6">{{item.mark}}</text>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
{{/each}}
|
|
27
|
+
</g>
|
|
28
|
+
<g transform="translate(0, {{spec.items.ticks.heightOffset}})">
|
|
29
|
+
<rect x="0" y="0" width="{{math spec.items.base.rect.width '+' 1}}" height="{{spec.items.totalHeight}}" fill="#FFFFFF" rx="1"/>
|
|
30
|
+
<rect x="{{math spec.items.base.rect.width '+' 1}}" y="0" width="5" height="{{spec.items.totalHeight}}" fill="url('#shadow')" fill-opacity="0.2"/>
|
|
31
|
+
</g>
|
|
32
|
+
<g transform="translate(0, {{spec.items.ticks.heightOffset}})">
|
|
33
|
+
{{#each items as |item index|}}
|
|
34
|
+
<g transform="translate(0, {{math index '*' ../spec.items.distanceY}})">
|
|
35
|
+
{{bar ../spec.items.base.rect.width ../spec.items.base.rect.height ../spec.items.base.rect.brs 0 fill=item.baseColor}}
|
|
36
|
+
<g transform="translate({{math ../spec.items.base.rect.height '/' 2}}, {{math ../spec.items.base.rect.height '/' 2}})">
|
|
37
|
+
<circle cx="0" cy="0" r="{{../spec.items.base.label.circle.radius}}" fill="white"/>
|
|
38
|
+
<text x="0" y="0" fill="{{item.baseColor}}" text-anchor="middle" font-size="20" font-weight="400" dy="6.5">{{item.label.abbr}}</text>
|
|
39
|
+
<text x="{{../spec.items.base.label.offsetX}}" y="0" fill="white" font-size="20" font-weight="500" text-anchor="end" dy="5.5">{{item.label.fr}}</text>
|
|
40
|
+
</g>
|
|
41
|
+
</g>
|
|
42
|
+
{{/each}}
|
|
43
|
+
</g>
|
|
44
|
+
</g>
|
|
45
|
+
<g transform="translate({{math (math spec.items.base.rect.width '+' spec.items.body.rect.maxWidth) '+' spec.raw.offsetX}}, {{math spec.items.totalHeight '+' (math 2 '*' spec.items.ticks.heightOffset)}}) scale(1, -1)">
|
|
46
|
+
<g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
|
|
47
|
+
{{#each rawTicks as |tick index|}}
|
|
48
|
+
<line x1="0" y1="{{tick.bottomPos}}" x2="{{../spec.raw.ticks.line.width}}" y2="{{tick.bottomPos}}" stroke="#E5E7EB" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
|
|
49
|
+
<g transform="translate({{math ../spec.raw.ticks.line.width '+' ../spec.raw.ticks.number.offsetX}}, {{tick.bottomPos}})">
|
|
50
|
+
<text x="0" y="0" fill="#9CA3AF" text-anchor="middle" font-size="14" font-weight="500" dy="4" transform="scale(1, -1)">{{tick.number}}</text>
|
|
51
|
+
</g>
|
|
52
|
+
{{/each}}
|
|
53
|
+
</g>
|
|
54
|
+
<rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{spec.raw.rect.height}}" rx="{{spec.raw.rect.borderRadius}}" fill="#E5E7EB"/>
|
|
55
|
+
<rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{raw.height}}" rx="{{spec.raw.rect.borderRadius}}" fill="#374151"/>
|
|
56
|
+
<g transform="translate({{spec.raw.rect.borderRadius}}, {{spec.raw.rect.borderRadius}})">
|
|
57
|
+
<g transform="translate(0, {{math raw.height '-' (math 2 '*' spec.raw.rect.borderRadius)}})">
|
|
58
|
+
<text x="0" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="700" dy="6.5" transform="scale(1, -1) translate(0, 12)">{{raw.mark}}</text>
|
|
59
|
+
</g>
|
|
60
|
+
<g>
|
|
61
|
+
<text x="0" y="0" fill="white" text-anchor="end" font-size="18" font-weight="500" dy="4" transform="scale(1, -1) rotate(-90)">{{raw.label.fr}}</text>
|
|
62
|
+
</g>
|
|
63
|
+
</g>
|
|
64
|
+
</g>
|
|
65
|
+
</g>
|
|
66
|
+
|
|
67
|
+
{{/layout}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{> PIES93}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
4
|
+
<g transform="translate(330, 288)">
|
|
5
|
+
<circle cx="0" cy="0" r="{{spec.raw.circle.R}}" fill="#F4F4F5" stroke="#E4E4E7"/>
|
|
6
|
+
<circle cx="0" cy="0" r="{{spec.raw.circle.r}}" fill="white"/>
|
|
7
|
+
<text x="0" y="0" font-size="28" font-weight="600" fill="#27272A" text-anchor="middle" dy="8.5">{{raw.mark}}</text>
|
|
8
|
+
{{gauge spec.raw.circle.R spec.raw.circle.r spec.raw.circle.brs (object start=spec.raw.circle.angles.start end=raw.stops.[0].angle) spec.raw.circle.direction fill="#E7E5E4"}}
|
|
9
|
+
{{gauge spec.raw.circle.R spec.raw.circle.r spec.raw.circle.brs (object start=raw.stops.[0].angle end=raw.angle) spec.raw.circle.direction fill=raw.interpret.fill}}
|
|
10
|
+
{{#each raw.stops as | stop stopIndex |}}
|
|
11
|
+
{{#with @root.spec.raw as | rawSpec |}}
|
|
12
|
+
{{setVar "p1" (polarToCartesian (math rawSpec.circle.R '+' 8) stop.angle)}}
|
|
13
|
+
{{setVar "p2" (polarToCartesian (math rawSpec.circle.R '+' 38) stop.angle)}}
|
|
14
|
+
{{setVar "p3" (polarToCartesian (math rawSpec.circle.R '+' 50) stop.angle)}}
|
|
15
|
+
<line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="#D4D4D8" stroke-dasharray="3"/>
|
|
16
|
+
<text x="{{p3.x}}" y="{{p3.y}}" font-size="12" font-weight="400" fill="#A1A1AA" text-anchor="middle" dy="3">{{stop.mark}}</text>
|
|
17
|
+
{{#unless @first}}
|
|
18
|
+
{{setVar "prevStopAngle" (lookup (lookup @root.raw.stops (math stopIndex '-' 1)) 'angle')}}
|
|
19
|
+
{{setVar "thetam" (math (math stop.angle '+' prevStopAngle) '/' 2)}}
|
|
20
|
+
{{setVar "pm1" (polarToCartesian (math rawSpec.circle.R '+' 35) thetam)}}
|
|
21
|
+
{{setVar "pm2" (polarToCartesian (math rawSpec.circle.R '+' 55) thetam)}}
|
|
22
|
+
{{setVar "interpret" (lookup @root.spec.raw.interprets (math stopIndex '-' 1))}}
|
|
23
|
+
{{setVar "isChosen" (boolean interpret.eng '===' @root.raw.interpret.eng)}}
|
|
24
|
+
<circle cx="{{pm1.x}}" cy="{{pm1.y}}" r="{{ternary isChosen 3.5 2.5}}" fill="{{ternary isChosen @root.raw.interpret.fill '#E4E4E7'}}"/>
|
|
25
|
+
<text x="{{pm2.x}}" y="{{pm2.y}}" text-anchor="{{lookup (object 1='end' 2='middle' 3='start') stopIndex}}" fill="{{ternary isChosen @root.raw.interpret.fill '#A1A1AA'}}" font-weight="{{ternary isChosen 500 400}}" font-size="{{ternary isChosen 16 14}}" dy="5">{{interpret.fr}}</text>
|
|
26
|
+
{{/unless}}
|
|
27
|
+
{{/with}}
|
|
28
|
+
{{/each}}
|
|
29
|
+
</g>
|
|
30
|
+
</g>
|
|
31
|
+
|
|
32
|
+
{{/layout}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
4
|
+
<g transform="translate(100, 20)">
|
|
5
|
+
<line x1="0" y1="-10" x2="0" y2="214" stroke="#D4D4D8" stroke-width="2" stroke-linecap="round" />
|
|
6
|
+
{{#each items as | item index |}}
|
|
7
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
8
|
+
<g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
|
|
9
|
+
<text x="-12" y="8" font-size="14" font-weight="400" fill="#7E22CE" text-anchor="start">{{item.label.fr}}</text>
|
|
10
|
+
<rect x="0" y="{{math itemsSpec.rect.body.height '-' itemsSpec.rect.base.height}}" width="500" height="{{itemsSpec.rect.base.height}}" fill="#F4F4F5" />
|
|
11
|
+
{{#if (boolean item.mark '!==' 0)}}
|
|
12
|
+
{{bar item.width itemsSpec.rect.body.height itemsSpec.rect.body.brs 0 fill="#7E22CE" fill-opacity=item.opacity}}
|
|
13
|
+
{{/if}}
|
|
14
|
+
<text x="{{math item.width '+' (ternary (boolean item.mark '!==' 0) 0 7)}}" y="-6" font-size="14" font-weight="500" fill="#7E22CE" text-anchor="middle">{{item.mark}}</text>
|
|
15
|
+
</g>
|
|
16
|
+
{{/with}}
|
|
17
|
+
{{/each}}
|
|
18
|
+
<text x="500" y="235" font-size="12" font-weight="400" fill="#D4D4D8" text-anchor="middle">50</text>
|
|
19
|
+
</g>
|
|
20
|
+
<g transform="translate(398, 329)">
|
|
21
|
+
{{#each questionItems as | item index |}}
|
|
22
|
+
<g transform="translate(0, {{ math index '*' 56 }})">
|
|
23
|
+
<text x="64" y="25" font-size="14" font-weight="400" fill="#3F3F46" text-anchor="end">{{ item.label }}</text>
|
|
24
|
+
{{#each item.marks as | mark markIndex |}}
|
|
25
|
+
<g transform="translate({{math -1 '*' (math markIndex '*' 64)}}, 0)">
|
|
26
|
+
{{#if (boolean index '===' 0)}}
|
|
27
|
+
<text x="20" y="-21" font-size="14" font-weight="400" fill="#3F3F46" text-anchor="middle">{{lookup (array 'و' 'ج' 'ه' 'الف' 'م' 'ق') markIndex}}</text>
|
|
28
|
+
{{/if}}
|
|
29
|
+
<rect x="0" y="0" width="40" height="40" fill="#F4F4F5" rx="4" />
|
|
30
|
+
<text x="20" y="25" font-size="16" font-weight="500" fill="#312E81" text-anchor="middle">{{ mark }}</text>
|
|
31
|
+
</g>
|
|
32
|
+
{{/each}}
|
|
33
|
+
</g>
|
|
34
|
+
{{/each}}
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
|
|
38
|
+
{{/layout}}
|