@baravak/risloo-profile-cli 4.2.8 → 4.3.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.
@@ -0,0 +1,106 @@
1
+ const { Profile } = require("../Profile");
2
+
3
+ class JSIQ93 extends Profile {
4
+ // Number of pages
5
+ static pages = 1;
6
+
7
+ // Labels of the sample
8
+ labels = {
9
+ L0 : {eng: "total", fa: "", max: 0},
10
+ L1 : {eng: "section_1_total", fa: "", max: 0},
11
+ L2 : {eng: "section_1_anger", fa: "عصبانیت", max: 0},
12
+ L3 : {eng: "section_1_tasteful", fa: "با سلیقه‌گی", max: 0},
13
+ L4 : {eng: "section_1_homemaker", fa: "کدبانوگری", max: 0},
14
+ L5 : {eng: "section_1_caring", fa: "مراقبت‌کنندگی", max: 0},
15
+ L6 : {eng: "section_1_jealousy", fa: "حسادت", max: 0},
16
+ L7 : {eng: "section_1_bighearted", fa: "دست و دلبازی", max: 0},
17
+ L8 : {eng: "section_1_grudge", fa: "کینه‌ای بودن", max: 0},
18
+ L9 : {eng: "section_1_courage", fa: "شجاعت", max: 0},
19
+ L10 : {eng: "section_1_irritable", fa: "زود رنجی", max: 0},
20
+ L11 : {eng: "section_1_sensitivity", fa: "حساسیت", max: 0},
21
+ L12 : {eng: "section_1_incuriosity", fa: "بی تفاوتی", max: 0},
22
+ L13 : {eng: "section_1_lack_of_understanding_of_the_spouse", fa: "عدم درک همسر", max: 0},
23
+ L14 : {eng: "section_1_reassure", fa: "دلگرمی دادن", max: 0},
24
+ L15 : {eng: "section_1_chaste", fa: "عفیف", max: 0},
25
+ L16 : {eng: "section_1_genial", fa: "خونگرم", max: 0},
26
+ L17 : {eng: "section_1_being_alarming", fa: "تشویق‌گر بودن", max: 0},
27
+ L18 : {eng: "section_1_being_persuasive", fa: "ترغیب‌گر بودن", max: 0},
28
+ L19 : {eng: "section_1_respectable", fa: "اهل احترام", max: 0},
29
+ L20 : {eng: "section_1_blamer", fa: "سرزنش‌گر", max: 0},
30
+ L21 : {eng: "section_1_others_influens", fa: "تأثیرپذیری از دیگران", max: 0},
31
+ L22 : {eng: "section_1_resistant_to_me", fa: "مقاوم بودن در برابر من", max: 0},
32
+ L23 : {eng: "section_1_flexibility", fa: "انعطاف", max: 0},
33
+ L24 : {eng: "section_1_secrecy", fa: "رازداری", max: 0},
34
+ L25 : {eng: "section_1_good_motherhood", fa: "مادرگری خوب", max: 0},
35
+ L26 : {eng: "section_1_hurry", fa: "عجول بودن", max: 0},
36
+ L27 : {eng: "section_1_faithful", fa: "با وفا", max: 0},
37
+ L28 : {eng: "section_1_stable", fa: "با ثبات", max: 0},
38
+ L29 : {eng: "section_1_capricious", fa: "دمدمی‌مزاج", max: 0},
39
+ L30 : {eng: "section_1_starnger_permeability", fa: "نفوذپذیری از غریبه‌ها", max: 0},
40
+ L31 : {eng: "section_1_wisdom", fa: "عاقل", max: 0},
41
+ L32 : {eng: "section_2_total", fa: "", max: 425},
42
+ L33 : {eng: "section_2_awareness_of_the_family_system", fa: "هشیاری نسبت به سیستم خانواده", max: 25},
43
+ L34 : {eng: "section_2_give_love", fa: "مهردهی", max: 140},
44
+ L35 : {eng: "section_2_perception_of_power", fa: "ادراک قدرت", max: 185},
45
+ L36 : {eng: "section_2_attention_sexual_safety", fa: "توجه ایمنی جنسی", max: 75},
46
+ };
47
+
48
+ profileSpec = {
49
+ /* "sample" determines some important info about the sample and profile */
50
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
51
+ /* "prerequisites" is synonym to "fields" in our program */
52
+ sample: {
53
+ name: "پرسشنامه تعامل همسران - ویرایش فرم آقایان" /* Name of the sample */,
54
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
55
+ questions: true /* Determines whether to get questions from inital dataset or not */,
56
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
57
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
58
+ },
59
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
60
+ /* calculating its dimensions carefully is of great importance */
61
+ profile: {
62
+ get dimensions() {
63
+ return {
64
+ width: 863 + (2 * this.padding.x),
65
+ height: 643 + (2 * this.padding.y),
66
+ };
67
+ },
68
+ padding: {
69
+ x: 20,
70
+ y: 33.5,
71
+ },
72
+ },
73
+
74
+ /* "labels" part which has to be provided for each profile */
75
+ labels: Object.values(this.labels),
76
+ };
77
+
78
+ constructor(dataset, options, config = {}) {
79
+ super();
80
+ this._init(dataset, options, config);
81
+ }
82
+
83
+ _calcContext() {
84
+ const {
85
+ spec: { parameters: spec },
86
+ dataset,
87
+ } = this;
88
+ const top = {
89
+ total: {...dataset.score[32], percentage: Math.round((dataset.score[32].mark / dataset.score[32].label.max) * 100)},
90
+ items: dataset.score.slice(33, 37).map(r => {
91
+ r.percentage = Math.round((r.mark / r.label.max) * 100)
92
+ return r
93
+ })
94
+ }
95
+ const items = dataset.score.slice(2, 32).map((r, i) => {
96
+ r.col = Math.floor(i /10)
97
+ r.row = i % 10
98
+ r.fill = r.row % 2 == 1 ? '#FAF5FF' : '#F5F3FF'
99
+ r.color = r.row % 2 == 1 ? '#6B21A8' : '#5B21B6'
100
+ return r
101
+ })
102
+ return [{ top, items }];
103
+ }
104
+ }
105
+
106
+ module.exports = JSIQ93;
@@ -0,0 +1,112 @@
1
+ const { Profile } = require("../Profile");
2
+
3
+ class JSIQ93 extends Profile {
4
+ // Number of pages
5
+ static pages = 1;
6
+
7
+ // Labels of the sample
8
+ labels = {
9
+ L0 : {eng: "total", max:0, fa: ""},
10
+ L1 : {eng: "section_1_total", max:0, fa: ""},
11
+ L2 : {eng: "section_1_anger", max:0, fa: "عصبانیت"},
12
+ L3 : {eng: "section_1_courage", max:0, fa: "شجاعت"},
13
+ L4 : {eng: "section_1_compassion", max:0, fa: "عطوفت"},
14
+ L5 : {eng: "section_1_bighearted", max:0, fa: "دست و دل‌ بازی"},
15
+ L6 : {eng: "section_1_grudge", max:0, fa: "کینه‌ورز بودن"},
16
+ L7 : {eng: "section_1_masculinity", max:0, fa: "مردانگی"},
17
+ L8 : {eng: "section_1_pessimism", max:0, fa: "بدبینی"},
18
+ L9 : {eng: "section_1_incuriosity", max:0, fa: "بی‌تفاوتی"},
19
+ L10 : {eng: "section_1_fidelity", max:0, fa: "وفاداری"},
20
+ L11 : {eng: "section_1_selfishness", max:0, fa: "خودخواهی"},
21
+ L12 : {eng: "section_1_intimacy", max:0, fa: "صمیمیت"},
22
+ L13 : {eng: "section_1_talkative", max:0, fa: "پرگویی"},
23
+ L14 : {eng: "section_1_mindlessness", max:0, fa: "بی‌فکری"},
24
+ L15 : {eng: "section_1_sophist", max:0, fa: "زبان‌بازی"},
25
+ L16 : {eng: "section_1_power", max:0, fa: "قدرت"},
26
+ L17 : {eng: "section_1_silence", max:0, fa: "سکوت"},
27
+ L18 : {eng: "section_1_independence", max:0, fa: "استقلال"},
28
+ L19 : {eng: "section_1_patronage", max:0, fa: "حمایت‌گری"},
29
+ L20 : {eng: "section_1_spouse_friendship", max:0, fa: "همسر دوستی"},
30
+ L21 : {eng: "section_1_forgiveness", max:0, fa: "بخشش"},
31
+ L22 : {eng: "section_2_total", max:525, fa: ""},
32
+ L23 : {eng: "section_2_family_structure", max:40, fa: "ساختار خانواده"},
33
+ L24 : {eng: "section_2_give_power", max:135, fa: "قدرت‌دهی"},
34
+ L25 : {eng: "section_2_perception_of_love", max:155, fa: "ادراک مهر"},
35
+ L26 : {eng: "section_2_attention_sexual_safety", max:100, fa: "توجه ایمنی جنسی"},
36
+ L27 : {eng: "section_2_woman_inattention", max:20, fa: "بی‌توجهی زن"},
37
+ L28 : {eng: "section_2_perceived_inattention", max:25, fa: "بی‌توجهی شوهر"},
38
+ L29 : {eng: "section_2_women_give_safety", max:20, fa: "ایمنی بخشی زن"},
39
+ L30 : {eng: "section_2_perceived_safety", max:30, fa: "ایمنی ادراک‌دشده"},
40
+ L31 : {eng: "section_3_q_1", max:0, fa: "همسران باید بتوانند ذهن یکدیگر را بخوانند."},
41
+ L32 : {eng: "section_3_q_2", max:0, fa: "همسر باید یک شریک جنسی عالی باشد."},
42
+ L33 : {eng: "section_3_q_3", max:0, fa: "اختلاف، رابطه را تخریب می‌کند."},
43
+ L34 : {eng: "section_3_q_4", max:0, fa: "همسران نمی‌توانند خود و یا رابطه‌شان را تغییر دهند."},
44
+ L35 : {eng: "section_3_q_5", max:0, fa: "مردان و زنان شخصیت‌ها و نیازهای بسیار متفاوتی دارند."},
45
+ };
46
+
47
+ profileSpec = {
48
+ /* "sample" determines some important info about the sample and profile */
49
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
50
+ /* "prerequisites" is synonym to "fields" in our program */
51
+ sample: {
52
+ name: "پرسشنامه تعامل همسران - ویرایش فرم زنان" /* Name of the sample */,
53
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
54
+ questions: true /* Determines whether to get questions from inital dataset or not */,
55
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
56
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
57
+ },
58
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
59
+ /* calculating its dimensions carefully is of great importance */
60
+ profile: {
61
+ get dimensions() {
62
+ return {
63
+ width: 865 + (2 * this.padding.x),
64
+ height: 691 + (2 * this.padding.y),
65
+ };
66
+ },
67
+ padding: {
68
+ x: 19,
69
+ y: 11.5,
70
+ },
71
+ },
72
+
73
+ /* "labels" part which has to be provided for each profile */
74
+ labels: Object.values(this.labels),
75
+ };
76
+
77
+ constructor(dataset, options, config = {}) {
78
+ super();
79
+ this._init(dataset, options, config);
80
+ }
81
+
82
+ _calcContext() {
83
+ const {
84
+ spec: { parameters: spec },
85
+ dataset,
86
+ } = this;
87
+ const top = {
88
+ total: {...dataset.score[22], percentage: Math.round((dataset.score[22].mark / dataset.score[22].label.max) * 100)},
89
+ items: dataset.score.slice(23, 31).map(r => {
90
+ r.percentage = Math.round((r.mark / r.label.max) * 100)
91
+ return r
92
+ })
93
+ }
94
+ const items = dataset.score.slice(2, 22).map((r, i) => {
95
+ r.col = Math.floor(i /10)
96
+ r.row = i % 10
97
+ r.fill = r.row % 2 == 1 ? '#FAF5FF' : '#F5F3FF'
98
+ r.color = r.row % 2 == 1 ? '#6B21A8' : '#5B21B6'
99
+ return r
100
+ })
101
+
102
+ const aggrees = dataset.score.slice(31, 36).map((r, i) => {
103
+ r.fa = r.mark === 'agreement'? 'موافق' : 'مخالف'
104
+ r.fill = r.mark === 'agreement' ? '#F0FDFA' : '#FDF2F8'
105
+ r.color = r.mark === 'agreement' ? '#115E59' : '#BE185D'
106
+ return r
107
+ })
108
+ return [{ top, items, aggrees }];
109
+ }
110
+ }
111
+
112
+ module.exports = JSIQ93;
@@ -0,0 +1,91 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ {{#each top.items}}
4
+ <clipPath id="barTop-{{@index}}">
5
+ {{bar (math 2 '*' label.max) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) }}
6
+ </clipPath>
7
+ {{/each}}
8
+ <clipPath id="barTop-total">
9
+ {{bar 20 212.5 (object tr=0 br=10 bl=10 tl=0) (toRad 180) }}
10
+ </clipPath>
11
+ <linearGradient id="line-bar" x1="0%" y1="0%" x2="100%" y2="0%">
12
+ <stop offset="0%" style="stop-color:#BAE6FD;stop-opacity:1" />
13
+ <stop offset="100%" style="stop-color:#0284C7;stop-opacity:1" />
14
+ </linearGradient>
15
+ </defs>
16
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
17
+ {{!-- <rect width="863" height="643" fill="blue" opacity=".1"/> --}}
18
+ <g transform="translate(26.55, 0)">
19
+ <g transform="translate(0, 8)">
20
+ {{#each top.items}}
21
+ <g transform="translate(0, {{math @index '*' 41}})">
22
+ <text text-anchor="start" x="185" font-weight="400" font-size="14" fill="#475569" dy=".78em">{{label.fa}}</text>
23
+ <g transform="translate(192, 0)">
24
+ {{bar (math 2 '*' label.max) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) fill="#F1F5F9" id=(concat 'x' @index)}}
25
+ {{bar (math 2 '*' mark) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) fill="url(#line-bar)" clip-path=(concat "url(#barTop-" (concat @index ')'))}}
26
+ <g transform="translate({{math 8 '+' (math 2 '*' label.max)}}, 0)">
27
+ <text text-anchor="start" dy=".85em" direction="ltr">
28
+ <tspan font-weight="500" font-size="16" fill="#0369A1">{{mark}}</tspan>
29
+ <tspan font-weight="400" font-size="12" fill="#475569">/ {{label.max}}</tspan>
30
+ </text>
31
+ <g transform="translate(70, 0)">
32
+ <rect width="35" height="16" fill="#F0F9FF" rx="4" />
33
+ <text text-anchor="middle" x="17.5" font-weight="400" font-size="12" fill="#0369A1" dy="1em">%{{percentage}}</text>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ {{/each}}
39
+ </g>
40
+ <rect x="191" y="0" width="1" height="153" rx="0.25" fill="#FFFFFF" style="filter: drop-shadow(2px 0px 2px rgba(0,0,0, .5));"/>
41
+ <g transform="translate(746, 0)">
42
+ <text text-anchor="start" x="-8" font-weight="400" font-size="14" fill="#334155" dy=".75em">425</text>
43
+ <text text-anchor="end" x="28" y="{{math 218 '-' (math top.total.mark '/' 2)}}" font-weight="500" font-size="20" fill="#334155">{{top.total.mark}}</text>
44
+ <text text-anchor="end" x="28" y="{{math 218 '-' (math top.total.mark '/' 2)}}" font-weight="400" font-size="12" fill="#334155" dy="1.25em">%{{top.total.percentage}}</text>
45
+ <text text-anchor="end" font-weight="400" font-size="14" fill="#334155" dy="1.25em" transform="rotate(-90) translate(-218, -28)">نمره کل</text>
46
+ {{bar 20 212.5 (object tr=0 br=10 bl=10 tl=0) (toRad 180) fill="#F1F5F9" transform="translate(20, 218)"}}
47
+ {{bar 20 (math top.total.mark '/' 2) (object tr=0 br=10 bl=10 tl=0) (toRad 180) fill="#64748B" transform="translate(20, 218)" clip-path="url(#barTop-total)"}}
48
+ <rect x="-1" y="218" width="22" height="1" rx="1" fill="#FFFFFF" style="filter: drop-shadow(1px 0 2px rgba(0,0,0, .5));"/>
49
+ </g>
50
+ </g>
51
+ <line x1="0" x2="863" y1="251.5" y2="251.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6" />
52
+ <g transform="translate(132.5, 284)">
53
+ {{#each items}}
54
+ <g transform="translate({{math 376 '-' (math 188 '*' col)}}, {{math 28 '*' row}})">
55
+ {{bar 32 24 (object tr=0 br=0 bl=2 tl=2) (toRad 0) fill=fill opacity='.5'}}
56
+ {{bar 146 24 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=fill opacity='.5' transform="translate(34, 0)"}}
57
+ <text text-anchor="middle" x="16" y="12" font-weight="400" font-size="13" fill="{{color}}" dy=".25em">{{ternary (boolean mark '===' undefined) '0' mark}}</text>
58
+ <text text-anchor="start" x="174" y="12" font-weight="400" font-size="13" fill="{{color}}" dy=".25em">{{label.fa}}</text>
59
+ </g>
60
+ {{/each}}
61
+ <line x1="143" x2="423" y1="331.5" y2="331.5" stroke="#E4E4E7"/>
62
+ <g transform="translate(126, 321)">
63
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
64
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">4</text>
65
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">به وضوح وجود دارد</text>
66
+ </g>
67
+ <g transform="translate(199.5, 321)">
68
+ <text text-anchor="middle" x="10" y="-8" font-weight="400" font-size="12" fill="#52525B">معمولا وجود دارد</text>
69
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
70
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">3</text>
71
+ </g>
72
+ <g transform="translate(273, 321)">
73
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
74
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">2</text>
75
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">نظری ندارم</text>
76
+ </g>
77
+ <g transform="translate(346.5, 321)">
78
+ <text text-anchor="middle" x="10" y="-8" font-weight="400" font-size="12" fill="#52525B">معمولا وجود ندارد</text>
79
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
80
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">1</text>
81
+ </g>
82
+ <g transform="translate(420, 321)">
83
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
84
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">0</text>
85
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">اصلا وجود ندارد</text>
86
+ </g>
87
+ <text text-anchor="start" font-weight="400" font-size="14" fill="#334155" transform="rotate(-90) translate(-103, 584)">صفات همسر</text>
88
+ </g>
89
+ </g>
90
+
91
+ {{/layout}}
@@ -0,0 +1,107 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ {{#each top.items}}
4
+ <clipPath id="barTop-{{@index}}">
5
+ {{bar (math 2 '*' label.max) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) }}
6
+ </clipPath>
7
+ {{/each}}
8
+ <clipPath id="barTop-total">
9
+ {{bar 20 262.5 (object tr=0 br=10 bl=10 tl=0) (toRad 180) }}
10
+ </clipPath>
11
+ <linearGradient id="line-bar" x1="0%" y1="0%" x2="100%" y2="0%">
12
+ <stop offset="0%" style="stop-color:#BAE6FD;stop-opacity:1" />
13
+ <stop offset="100%" style="stop-color:#0284C7;stop-opacity:1" />
14
+ </linearGradient>
15
+ </defs>
16
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
17
+ <g transform="translate(22, 0)">
18
+ <g transform="translate(0, 8)">
19
+ {{#each top.items}}
20
+ <g transform="translate(0, {{math @index '*' 34}})">
21
+ <text text-anchor="start" x="103" font-weight="400" font-size="14" fill="#475569" dy=".78em">{{label.fa}}</text>
22
+ <g transform="translate(110, 0)">
23
+ {{bar (math 3 '*' label.max) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) fill="#F1F5F9" id=(concat 'x' @index)}}
24
+ {{bar (math 3 '*' mark) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) fill="url(#line-bar)" clip-path=(concat "url(#barTop-" (concat @index ')'))}}
25
+ <g transform="translate({{math 8 '+' (math 3 '*' label.max)}}, 0)">
26
+ <text text-anchor="start" dy=".85em" direction="ltr">
27
+ <tspan font-weight="500" font-size="16" fill="#0369A1">{{mark}}</tspan>
28
+ <tspan font-weight="400" font-size="12" fill="#475569">/ {{label.max}}</tspan>
29
+ </text>
30
+ <g transform="translate(70, 0)">
31
+ <rect width="35" height="16" fill="#F0F9FF" rx="4" />
32
+ <text text-anchor="middle" x="17.5" font-weight="400" font-size="12" fill="#0369A1" dy="1em">%{{percentage}}</text>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ {{/each}}
38
+ </g>
39
+ <rect x="109" y="0" width="1" height="270" rx="0.25" fill="#FFFFFF" style="filter: drop-shadow(2px 0px 2px rgba(0,0,0, .5));"/>
40
+ <g transform="translate(759, 0)">
41
+ <text text-anchor="start" x="-8" font-weight="400" font-size="14" fill="#334155" dy=".75em">{{top.total.label.max}}</text>
42
+ <text text-anchor="end" x="28" y="{{math 267 '-' (math top.total.mark '/' 2)}}" font-weight="500" font-size="20" fill="#334155">{{top.total.mark}}</text>
43
+ <text text-anchor="end" x="28" y="{{math 267 '-' (math top.total.mark '/' 2)}}" font-weight="400" font-size="12" fill="#334155" dy="1.25em">%{{top.total.percentage}}</text>
44
+ <text text-anchor="end" font-weight="400" font-size="14" fill="#334155" dy="1.25em" transform="rotate(-90) translate(-267, -28)">نمره کل</text>
45
+ {{bar 20 262.5 (object tr=0 br=10 bl=10 tl=0) (toRad 180) fill="#F1F5F9" transform="translate(20, 267)"}}
46
+ {{bar 20 (math top.total.mark '/' 2) (object tr=0 br=10 bl=10 tl=0) (toRad 180) fill="#64748B" transform="translate(20, 267)" clip-path="url(#barTop-total)"}}
47
+ <rect x="-1" y="267" width="22" height="1" rx="1" fill="#FFFFFF" style="filter: drop-shadow(1px 0 2px rgba(0,0,0, .5));"/>
48
+ </g>
49
+ </g>
50
+ <line x1="0" x2="863" y1="302.5" y2="302.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6" />
51
+ <g transform="translate(451, 326)">
52
+ {{#each items}}
53
+ <g transform="translate({{math 188 '-' (math 188 '*' col)}}, {{math 28 '*' row}})">
54
+ {{bar 32 24 (object tr=0 br=0 bl=2 tl=2) (toRad 0) fill=fill opacity='.5'}}
55
+ {{bar 146 24 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=fill opacity='.5' transform="translate(34, 0)"}}
56
+ <text text-anchor="middle" x="16" y="12" font-weight="400" font-size="13" fill="{{color}}" dy=".25em">{{ternary (boolean mark '===' undefined) '0' mark}}</text>
57
+ <text text-anchor="start" x="174" y="12" font-weight="400" font-size="13" fill="{{color}}" dy=".25em">{{label.fa}}</text>
58
+ </g>
59
+ {{/each}}
60
+ <g transform="translate(0, 321)">
61
+ <line x1="40" x2="330" y1="10.5" y2="10.5" stroke="#E4E4E7"/>
62
+ <g transform="translate(36, 0)">
63
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
64
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">4</text>
65
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">به وضوح وجود دارد</text>
66
+ </g>
67
+ <g transform="translate(109.5, 0)">
68
+ <text text-anchor="middle" x="10" y="-8" font-weight="400" font-size="12" fill="#52525B">معمولا وجود دارد</text>
69
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
70
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">3</text>
71
+ </g>
72
+ <g transform="translate(183, 0)">
73
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
74
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">2</text>
75
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">نظری ندارم</text>
76
+ </g>
77
+ <g transform="translate(256.5, 0)">
78
+ <text text-anchor="middle" x="10" y="-8" font-weight="400" font-size="12" fill="#52525B">معمولا وجود ندارد</text>
79
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
80
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">1</text>
81
+ </g>
82
+ <g transform="translate(330, 0)">
83
+ <circle r="10" fill="#FAFAFA" transform="translate(10, 10)"/>
84
+ <text text-anchor="middle" x="10" y="10" font-weight="400" font-size="12" fill="#52525B" dy=".35em">0</text>
85
+ <text text-anchor="middle" x="10" y="24" dy=".85em" font-weight="400" font-size="12" fill="#52525B">اصلا وجود ندارد</text>
86
+ </g>
87
+ </g>
88
+ <text text-anchor="start" font-weight="400" font-size="14" fill="#334155" transform="rotate(-90) translate(-103, 396)">صفات همسر</text>
89
+ </g>
90
+ <line x1="421" x2="421" y1="327" y2="690" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6" />
91
+ <g transform="translate(1, 411)">
92
+ {{#each aggrees}}
93
+ <g transform="translate(0, {{math 42 '*' @index}})">
94
+ <g transform="translate(324, 0)">
95
+ <rect width="72" height="28" r="4" fill="{{fill}}" />
96
+ <text text-anchor="middle" x="36" y="14" dy=".25em" font-weight="400" font-size="13" fill="{{color}}">{{fa}}</text>
97
+ </g>
98
+ <g transform="translate(0, 6)">
99
+ <rect width="328" height="28" r="4" fill="{{fill}}" opacity=".5" />
100
+ <text text-anchor="start" x="312" y="14" dy=".25em" font-weight="400" font-size="13" fill="{{color}}">{{label.fa}}</text>
101
+ </g>
102
+ </g>
103
+ {{/each}}
104
+ </g>
105
+ </g>
106
+
107
+ {{/layout}}