@baravak/risloo-profile-cli 3.5.2 → 4.0.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/package.json +3 -4
- package/src/Profile.js +9 -2
- package/src/publish/json/profiles/PMCIEF9A.json +1 -0
- package/src/publish/json/profiles/SCL9093.json +44 -0
- package/src/publish/json/profiles/YSQ93.json +1 -0
- package/src/samples/PMCIEF9A.js +528 -0
- package/src/samples/SCL9093.js +178 -0
- package/src/samples/YSQ93.js +118 -0
- package/views/profiles/samples/PMCIEF9A_1.hbs +277 -0
- package/views/profiles/samples/PMCIEF9A_2.hbs +76 -0
- package/views/profiles/samples/PMCIEF9A_3.hbs +154 -0
- package/views/profiles/samples/SCL9093.hbs +88 -0
- package/views/profiles/samples/YSQ93.hbs +86 -0
- package/views/profiles/sidebar.hbs +2 -2
- package/.yarn/releases/yarn-1.22.19.cjs +0 -147529
- package/.yarnrc.yml +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
const { Profile, FS, Mappings } = require("../Profile");
|
|
2
|
+
|
|
3
|
+
const colorLevel = [
|
|
4
|
+
'#65A30D',
|
|
5
|
+
'#EAB308',
|
|
6
|
+
'#EA580C',
|
|
7
|
+
'#E11D48',
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
const colorSubLevel = [
|
|
11
|
+
'#BEF264',
|
|
12
|
+
'#FEF08A',
|
|
13
|
+
'#FDBA74',
|
|
14
|
+
'#FDA4AF',
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
class SCL9093 extends Profile {
|
|
18
|
+
// Number of pages
|
|
19
|
+
static pages = 1;
|
|
20
|
+
|
|
21
|
+
// Labels of the sample
|
|
22
|
+
labels = {
|
|
23
|
+
L1: { eng: "som_raw", en : "SOM", fr: "شکایت جسمانی"},
|
|
24
|
+
L2: { eng: "som_mean", en : "", fr: ""},
|
|
25
|
+
L3: { eng: "som_report", en : "", fr: ""},
|
|
26
|
+
L4: { eng: "som_status", en : "", fr: ""},
|
|
27
|
+
|
|
28
|
+
L5: { eng: "oc_raw", en : "O-C", fr: "وسواسی - اجباری"},
|
|
29
|
+
L6: { eng: "oc_mean", en : "", fr: ""},
|
|
30
|
+
L7: { eng: "oc_report", en : "", fr: ""},
|
|
31
|
+
L8: { eng: "oc_status", en : "", fr: ""},
|
|
32
|
+
|
|
33
|
+
L9: { eng: "int_raw", en : "INT", fr: "حساسیت در روابط متقابل"},
|
|
34
|
+
L10: { eng: "int_mean", en : "", fr: ""},
|
|
35
|
+
L11: { eng: "int_report", en : "", fr: ""},
|
|
36
|
+
L12: { eng: "int_status", en : "", fr: ""},
|
|
37
|
+
|
|
38
|
+
L13: { eng: "dep_raw", en : "DEP", fr: "افسردگی"},
|
|
39
|
+
L14: { eng: "dep_mean", en : "", fr: ""},
|
|
40
|
+
L15: { eng: "dep_report", en : "", fr: ""},
|
|
41
|
+
L16: { eng: "dep_status", en : "", fr: ""},
|
|
42
|
+
|
|
43
|
+
L17: { eng: "anx_raw", en : "ANX", fr: "اضطراب"},
|
|
44
|
+
L18: { eng: "anx_mean", en : "", fr: ""},
|
|
45
|
+
L19: { eng: "anx_report", en : "", fr: ""},
|
|
46
|
+
L20: { eng: "anx_status", en : "", fr: ""},
|
|
47
|
+
|
|
48
|
+
L21: { eng: "hos_raw", en : "HOS", fr: "پرخاشگری (خصومت)"},
|
|
49
|
+
L22: { eng: "hos_mean", en : "", fr: ""},
|
|
50
|
+
L23: { eng: "hos_report", en : "", fr: ""},
|
|
51
|
+
L24: { eng: "hos_status", en : "", fr: ""},
|
|
52
|
+
|
|
53
|
+
L25: { eng: "phob_raw", en : "PHOB", fr: "ترس مرضی"},
|
|
54
|
+
L26: { eng: "phob_mean", en : "", fr: ""},
|
|
55
|
+
L27: { eng: "phob_report", en : "", fr: ""},
|
|
56
|
+
L28: { eng: "phob_status", en : "", fr: ""},
|
|
57
|
+
|
|
58
|
+
L29: { eng: "par_raw", en : "PAR", fr: "افکار پارانوئیدی"},
|
|
59
|
+
L30: { eng: "par_mean", en : "", fr: ""},
|
|
60
|
+
L31: { eng: "par_report", en : "", fr: ""},
|
|
61
|
+
L32: { eng: "par_status", en : "", fr: ""},
|
|
62
|
+
|
|
63
|
+
L33: { eng: "psy_raw", en : "PSY", fr: "روانگسستگی"},
|
|
64
|
+
L34: { eng: "psy_mean", en : "", fr: ""},
|
|
65
|
+
L35: { eng: "psy_report", en : "", fr: ""},
|
|
66
|
+
L36: { eng: "psy_status", en : "", fr: ""},
|
|
67
|
+
|
|
68
|
+
L37: { eng: "ext_raw", en : "EXT", fr: "سوالهای اضافی"},
|
|
69
|
+
L38: { eng: "ext_mean", en : "", fr: ""},
|
|
70
|
+
L39: { eng: "ext_report", en : "", fr: ""},
|
|
71
|
+
L40: { eng: "ext_status", en : "", fr: ""},
|
|
72
|
+
|
|
73
|
+
L41: { eng: "total", en : "", fr: ""},
|
|
74
|
+
L42: { eng: "pst", en : "", fr: ""},
|
|
75
|
+
L43: { eng: "gsi", en : "", fr: ""},
|
|
76
|
+
L44: { eng: "psdi", en : "", fr: ""},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
profileSpec = {
|
|
80
|
+
/* "sample" determines some important info about the sample and profile */
|
|
81
|
+
/* Default prerequisites: 1. gender, 2. age, 3. education */
|
|
82
|
+
/* "prerequisites" is synonym to "fields" in our program */
|
|
83
|
+
sample: {
|
|
84
|
+
name: "چکلیست نشانههای اختلالات روانی " /* Name of the sample */,
|
|
85
|
+
multiProfile: false /* Whether the sample has multiple profiles or not */,
|
|
86
|
+
questions: false /* Determines whether to get questions from inital dataset or not */,
|
|
87
|
+
defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
|
|
88
|
+
fields: [] /* In case you want to get some additional fields and show in the profile */,
|
|
89
|
+
},
|
|
90
|
+
/* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
|
|
91
|
+
/* calculating its dimensions carefully is of great importance */
|
|
92
|
+
profile: {
|
|
93
|
+
get dimensions() {
|
|
94
|
+
return {
|
|
95
|
+
width: 780 + 2 * this.padding.x,
|
|
96
|
+
height: 506 + 2 * this.padding.y,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
padding: {
|
|
100
|
+
x: 61.5,
|
|
101
|
+
y: 104,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
/* "labels" part which has to be provided for each profile */
|
|
106
|
+
labels: Object.values(this.labels),
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
constructor(dataset, options, config = {}) {
|
|
110
|
+
super();
|
|
111
|
+
this._init(dataset, options, config);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
_calcContext() {
|
|
115
|
+
const {
|
|
116
|
+
dataset,
|
|
117
|
+
} = this;
|
|
118
|
+
const items = [];
|
|
119
|
+
for(let i = 0; i < 40; i+=4){
|
|
120
|
+
const item = {
|
|
121
|
+
raw:dataset.score[i].mark,
|
|
122
|
+
title: dataset.score[i].label.fr,
|
|
123
|
+
en: dataset.score[i].label.en,
|
|
124
|
+
mean: toFixed(dataset.score[i+1].mark),
|
|
125
|
+
};
|
|
126
|
+
item.params = setByPr(item, dataset.score[i+3].mark || 0)
|
|
127
|
+
|
|
128
|
+
items.push(item);
|
|
129
|
+
}
|
|
130
|
+
const colors = colorLevel.map((c, i) => ({start: colorSubLevel[i], end: c}))
|
|
131
|
+
const total = dataset.score[40].mark;
|
|
132
|
+
const pst = dataset.score[41].mark;
|
|
133
|
+
const gsi = toFixed(dataset.score[42].mark);
|
|
134
|
+
const psdi = toFixed(dataset.score[43].mark);
|
|
135
|
+
return [{ colors, items, total, pst, gsi, psdi }];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function setByPr(item, level){
|
|
140
|
+
const colors = [
|
|
141
|
+
{
|
|
142
|
+
col: colorLevel[0],
|
|
143
|
+
gr: `url(#barx0)`,
|
|
144
|
+
background:'#F9FAFB',
|
|
145
|
+
bar_start: colorSubLevel[0],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
col: colorLevel[1],
|
|
149
|
+
gr: `url(#barx1)`,
|
|
150
|
+
background:'#FEFCE8',
|
|
151
|
+
bar_start: colorSubLevel[1],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
col: colorLevel[2],
|
|
155
|
+
gr: `url(#barx2)`,
|
|
156
|
+
background:'#FFF7ED',
|
|
157
|
+
bar_start: colorSubLevel[2],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
col: colorLevel[3],
|
|
161
|
+
gr: `url(#barx3)`,
|
|
162
|
+
background:'#FFF1F2',
|
|
163
|
+
bar_start: colorSubLevel[3],
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
return Object.assign({}, {level:level}, colors[level])
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function toFixed(number){
|
|
170
|
+
if(Math.round(number) == number){
|
|
171
|
+
return number;
|
|
172
|
+
}
|
|
173
|
+
if(number.toFixed(1) == number){
|
|
174
|
+
return number;
|
|
175
|
+
}
|
|
176
|
+
return number.toFixed(2);
|
|
177
|
+
}
|
|
178
|
+
module.exports = SCL9093;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const { Profile, FS, Mappings } = require("../Profile");
|
|
2
|
+
|
|
3
|
+
class YSQ93 extends Profile {
|
|
4
|
+
// Number of pages
|
|
5
|
+
static pages = 1;
|
|
6
|
+
|
|
7
|
+
// Labels of the sample
|
|
8
|
+
labels = {
|
|
9
|
+
L1: { eng: "ed", fr: "محرومیت هیجانی" },
|
|
10
|
+
L2: { eng: "ab", fr: "رهاشدگی / بیثباتی" },
|
|
11
|
+
L3: { eng: "ma", fr: "بیاعتمادی / بدرفتاری" },
|
|
12
|
+
L4: { eng: "si", fr: "انزوای اجتماعی / بیگانگی" },
|
|
13
|
+
L5: { eng: "ds", fr: "نقص / شرم" },
|
|
14
|
+
L6: { eng: "fa", fr: "شکست" },
|
|
15
|
+
L7: { eng: "ai", fr: "وابستگی / بیکفایتی" },
|
|
16
|
+
L8: { eng: "vu", fr: "آسیبپذیری نسبت به ضرر یا بیماری" },
|
|
17
|
+
L9: { eng: "eu", fr: "گرفتار / خویشتن تحولنیافته" },
|
|
18
|
+
L10: { eng: "sb", fr: "اطاعت" },
|
|
19
|
+
L11: { eng: "ss", fr: "ایثارگری" },
|
|
20
|
+
L12: { eng: "ei", fr: "بازداری هیجانی" },
|
|
21
|
+
L13: { eng: "us", fr: "معیارهای سختگیرانه" },
|
|
22
|
+
L14: { eng: "et", fr: "استحقاق / بزرگمنشی" },
|
|
23
|
+
L15: { eng: "is", fr: "خویشتنداری / خودانضباطی ناکافی" },
|
|
24
|
+
L16: { eng: "as", fr: "پذیرشجویی / جلب توجه" },
|
|
25
|
+
L17: { eng: "np", fr: "منفیگرایی / بدبینی" },
|
|
26
|
+
L18: { eng: "pu", fr: "تنبیه" },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
profileSpec = {
|
|
30
|
+
/* "sample" determines some important info about the sample and profile */
|
|
31
|
+
/* Default prerequisites: 1. gender, 2. age, 3. education */
|
|
32
|
+
/* "prerequisites" is synonym to "fields" in our program */
|
|
33
|
+
sample: {
|
|
34
|
+
name: "آزمون روانبنههای یانگ - 90 سؤالی" /* Name of the sample */,
|
|
35
|
+
multiProfile: false /* Whether the sample has multiple profiles or not */,
|
|
36
|
+
questions: true /* Determines whether to get questions from inital dataset or not */,
|
|
37
|
+
defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
|
|
38
|
+
fields: [] /* In case you want to get some additional fields and show in the profile */,
|
|
39
|
+
},
|
|
40
|
+
/* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
|
|
41
|
+
/* calculating its dimensions carefully is of great importance */
|
|
42
|
+
profile: {
|
|
43
|
+
get dimensions() {
|
|
44
|
+
return {
|
|
45
|
+
width: 815 + 2 * this.padding.x,
|
|
46
|
+
height: 609 + 2 * this.padding.y,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
padding: {
|
|
50
|
+
x: 44,
|
|
51
|
+
y: 52.5,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
/* "labels" part which has to be provided for each profile */
|
|
56
|
+
labels: Object.values(this.labels),
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
constructor(dataset, options, config = {}) {
|
|
60
|
+
super();
|
|
61
|
+
this._init(dataset, options, config);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
_calcContext() {
|
|
65
|
+
const {
|
|
66
|
+
dataset,
|
|
67
|
+
} = this;
|
|
68
|
+
const items = dataset.score.map((s, i) =>{
|
|
69
|
+
const a5 = [];
|
|
70
|
+
const a6 = [];
|
|
71
|
+
let start = 0;
|
|
72
|
+
const a5_line = [32]
|
|
73
|
+
for(let j = 0; j < 5; j++){
|
|
74
|
+
const key = i + (j * 18);
|
|
75
|
+
if(dataset.questions[key].user_answered == 5){
|
|
76
|
+
if(!a5.length){
|
|
77
|
+
start+= 37
|
|
78
|
+
}else{
|
|
79
|
+
start+= 26
|
|
80
|
+
}
|
|
81
|
+
a5.push({item: key+1, start:start})
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
a5_line.push(start + 2)
|
|
85
|
+
const a6_start = start ? start + 36 : 0;
|
|
86
|
+
const a6_line = [a6_start + 32]
|
|
87
|
+
for(let j = 0; j < 5; j++){
|
|
88
|
+
const key = i + (j * 18);
|
|
89
|
+
if(dataset.questions[key].user_answered == 6){
|
|
90
|
+
if(!a6.length){
|
|
91
|
+
start = a6_start + 37
|
|
92
|
+
}else{
|
|
93
|
+
start+= 26
|
|
94
|
+
}
|
|
95
|
+
a6.push({item: key+1, start:start})
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
a6_line.push(start + 2)
|
|
99
|
+
const is_critical = a5.length || a6.length ? true : false
|
|
100
|
+
return Object.assign({}, s, {
|
|
101
|
+
up:s.label.eng.toUpperCase(),
|
|
102
|
+
a5:a5,
|
|
103
|
+
a5_line:a5_line,
|
|
104
|
+
a6_line:a6_line,
|
|
105
|
+
a6:a6,
|
|
106
|
+
a6_start:a6_start,
|
|
107
|
+
is_critical : is_critical,
|
|
108
|
+
warn: is_critical || s.mark >= 15 ? true : false,
|
|
109
|
+
mean:s.mark >= 15 ? true : false,
|
|
110
|
+
fill:is_critical ? "url(#critical)" : "url(#normal)",
|
|
111
|
+
percentage: Math.round((s.mark * 100) / 30)
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
return [{ items }];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
module.exports = YSQ93;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<defs>
|
|
5
|
+
{{#with section2.circle.circle}}
|
|
6
|
+
<clipPath id="raw-circle-roll">
|
|
7
|
+
{{gauge R r brs (object start=angles.start end=angles.end) false}}
|
|
8
|
+
</clipPath>
|
|
9
|
+
{{/with}}
|
|
10
|
+
{{#with section6.gauge.circle.circle}}
|
|
11
|
+
<clipPath id="raw-circle6-roll">
|
|
12
|
+
{{gauge R r brs (object start=angles.start end=angles.end) false}}
|
|
13
|
+
</clipPath>
|
|
14
|
+
{{/with}}
|
|
15
|
+
<clipPath id="bar64x16">
|
|
16
|
+
{{bar 64 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0)}}
|
|
17
|
+
</clipPath>
|
|
18
|
+
<clipPath id="bar80x16">
|
|
19
|
+
{{bar 64 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0)}}
|
|
20
|
+
</clipPath>
|
|
21
|
+
<clipPath id="bar329x12">
|
|
22
|
+
{{bar 329 12 (object tr=12 tl=0 br=0 bl=0) (toRad 0)}}
|
|
23
|
+
</clipPath>
|
|
24
|
+
<linearGradient id="line-bar" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
25
|
+
<stop offset="0%" style="stop-color:#4CBFF5;stop-opacity:1" />
|
|
26
|
+
<stop offset="100%" style="stop-color:#0369A1;stop-opacity:1" />
|
|
27
|
+
</linearGradient>
|
|
28
|
+
</defs>
|
|
29
|
+
|
|
30
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
31
|
+
{{!-- RAW 1 --}}
|
|
32
|
+
<g>
|
|
33
|
+
{{!-- SECTION 5 --}}
|
|
34
|
+
<g>
|
|
35
|
+
{{bar 260 40 (object tr=0 tl=0 bl=12 br=12) (toRad 0) fill="#F8FAFC" transform="translate(0, 168)"}}
|
|
36
|
+
{{bar 260 208 (object tr=12 tl=12 bl=12 br=12) (toRad 0) stroke="#CBD5E1" fill="none"}}
|
|
37
|
+
<g transform="translate(215.5, 168)">
|
|
38
|
+
{{bar 25 25 (object tr=8 br=8 bl=8 tl=8) (toRad 0) fill="none" stroke="#E2E8F0" transform="translate(-25, 7.5)"}}
|
|
39
|
+
<text x="-12.5" y="20" text-anchor="middle" dy="5" font-size="14" font-weight="500" fill="#475569">5 </text>
|
|
40
|
+
<text x="-33" y="20" dy="5" font-size="14" font-weight="500" fill="#52525B">دیدگاهها و علایق مشترک</text>
|
|
41
|
+
</g>
|
|
42
|
+
|
|
43
|
+
<g transform="translate(115.5, 116.8)">
|
|
44
|
+
{{#with section5}}
|
|
45
|
+
<text x="0" y="-6" font-size="20" font-weight="500" fill="#BE185D" text-anchor="middle" dy="8">{{item.mark}}</text>
|
|
46
|
+
<text x="0" y="6" font-size="10" font-weight="400" fill="#4B5563" text-anchor="middle" dy="8">%{{percentage.mark}}</text>
|
|
47
|
+
{{#with circle.circle as | circleSpec |}}
|
|
48
|
+
<circle cx="0" cy="0" r="{{circleSpec.center.radius}}" stroke="#D1D5DB" fill="none"/>
|
|
49
|
+
{{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs circleSpec.main.angles circleSpec.main.direction fill=circleSpec.main.base.fill stroke=circleSpec.main.base.stroke}}
|
|
50
|
+
{{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs (object start=circleSpec.main.angles.start end=../item.angle) circleSpec.main.direction fill=circleSpec.main.body.fill stroke=circleSpec.main.body.stroke}}
|
|
51
|
+
{{setVar "p1" (polarToCartesian circleSpec.center.radius ../item.angle)}}
|
|
52
|
+
{{setVar "p2" (polarToCartesian circleSpec.main.R ../item.angle)}}
|
|
53
|
+
<line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="#6B7280"/>
|
|
54
|
+
{{/with}}
|
|
55
|
+
<g font-size="14" font-weight="400" fill="#A1A1AA">
|
|
56
|
+
{{#each item.stops as | stop index |}}
|
|
57
|
+
{{#with ../circle as | itemSpec |}}
|
|
58
|
+
{{setVar "p" (polarToCartesian (math itemSpec.circle.main.R '+' 10) stop.angle)}}
|
|
59
|
+
{{setVar "betMinus90And90" (boolean (boolean stop.angle '>' (toRad -90)) '&&' (boolean stop.angle '<' (toRad 90)))}}
|
|
60
|
+
<text x="{{p.x}}" y="{{p.y}}" text-anchor="{{ternary betMinus90And90 'end' 'start'}}" dy="0">{{stop.mark}}</text>
|
|
61
|
+
{{/with}}
|
|
62
|
+
{{/each}}
|
|
63
|
+
</g>
|
|
64
|
+
{{/with}}
|
|
65
|
+
</g>
|
|
66
|
+
</g>
|
|
67
|
+
|
|
68
|
+
{{!-- SECTION 3 --}}
|
|
69
|
+
<g transform="translate(284, 0)">
|
|
70
|
+
{{bar 260 40 (object tr=0 tl=0 bl=12 br=12) (toRad 0) fill="#F8FAFC" transform="translate(0, 168)"}}
|
|
71
|
+
{{bar 260 208 (object tr=12 tl=12 bl=12 br=12) (toRad 0) stroke="#CBD5E1" fill="none"}}
|
|
72
|
+
<g transform="translate(212, 168)">
|
|
73
|
+
{{bar 25 25 (object tr=8 br=8 bl=8 tl=8) (toRad 0) fill="none" stroke="#E2E8F0" transform="translate(-25, 7.5)"}}
|
|
74
|
+
<text x="-12.5" y="20" text-anchor="middle" dy="5" font-size="14" font-weight="500" fill="#475569">3 </text>
|
|
75
|
+
<text x="-33" y="20" dy="5" font-size="14" font-weight="500" fill="#52525B">ملاکهای انتخاب همسر</text>
|
|
76
|
+
</g>
|
|
77
|
+
<g transform="translate(26.5, 116)">
|
|
78
|
+
{{#each (array 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100)}}
|
|
79
|
+
{{bar 6 (math 4 '+' (math @key '*' 4)) (object tl=2 tr=2 bl=2 br=2) (toRad 180)
|
|
80
|
+
fill=(ternary (boolean @key '>=' @root.section3.total.mark) '#A1A1AA' '#65A30D')
|
|
81
|
+
opacity=(math this '/' 100)
|
|
82
|
+
transform=(concat "translate(" (concat (math @key '*' 9) ", 0)"))}}
|
|
83
|
+
{{/each}}
|
|
84
|
+
<text transform="translate({{section3.total.ml}}, {{math -14 '-' (math section3.total.mark '*' 4) }}) rotate(-30, 0, 0)"
|
|
85
|
+
text-anchor="{{ternary (boolean section3.total.mark '>=' 5 ) 'start' 'end'}}" font-size="14" font-weight="400" fill="#4B5563">%{{section3.percentage.mark}}</text>
|
|
86
|
+
|
|
87
|
+
<text x="{{section3.total.ml}}" y="10" font-weight="500" dy="14" text-anchor="middle" font-size="22" fill="#4D7C0F">{{section3.total.mark}}</text>
|
|
88
|
+
<text x="193" y="0" font-weight="400" text-anchor="end" font-size="14px" fill="#4B5563">{{section3.total.label.max}}</text>
|
|
89
|
+
</g>
|
|
90
|
+
</g>
|
|
91
|
+
|
|
92
|
+
{{!-- SECTION 2 --}}
|
|
93
|
+
<g transform="translate(568, 0)">
|
|
94
|
+
{{bar 260 40 (object tr=0 tl=0 bl=12 br=12) (toRad 0) fill="#F8FAFC" transform="translate(0, 168)"}}
|
|
95
|
+
{{bar 260 208 (object tr=12 tl=12 bl=12 br=12) (toRad 0) stroke="#CBD5E1" fill="none"}}
|
|
96
|
+
<g transform="translate(165.5, 168)">
|
|
97
|
+
{{bar 25 25 (object tr=8 br=8 bl=8 tl=8) (toRad 0) fill="none" stroke="#E2E8F0" transform="translate(-25, 7.5)"}}
|
|
98
|
+
<text x="-12.5" y="20" text-anchor="middle" dy="5" font-size="14" font-weight="500" fill="#475569">2</text>
|
|
99
|
+
<text x="-33" y="20" dy="5" font-size="14" font-weight="500" fill="#52525B">آشنایی</text>
|
|
100
|
+
</g>
|
|
101
|
+
<g transform="translate(130, 85)">
|
|
102
|
+
{{#with section2}}
|
|
103
|
+
{{#with circle.circle}}
|
|
104
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=angles.end) direction clip-path="url(#raw-circle-roll)" fill="#F4F4F5" stroke="#E4E4E7"}}
|
|
105
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=../zeta) direction clip-path="url(#raw-circle-roll)" fill=../circle.fill fill-opacity=../raw.opacity}}
|
|
106
|
+
{{/with}}
|
|
107
|
+
<text x="0" y="0" text-anchor="middle" font-size="28" font-weight="500" fill="{{circle.fill}}">{{mark}}</text>
|
|
108
|
+
<text x="0" y="22" text-anchor="middle" font-size="14" font-weight="400" fill="{{circle.fill}}">%{{percentage.mark}}</text>
|
|
109
|
+
{{setVar "rm" (math (math circle.circle.R '+' circle.circle.r) '/' 2)}}
|
|
110
|
+
{{setVar "p" (polarToCartesian rm start.angle)}}
|
|
111
|
+
<text x="{{math p.x '-' 8}}" y="{{p.y}}" font-size="14" font-weight="500" fill="#6B7280" text-anchor="middle" dy="4" transform="translate(-{{ternary @first ../circle.ticks.number.offset 0}}, -{{ternary @last ../circle.ticks.number.offset 0}})">{{start.number}}</text>
|
|
112
|
+
|
|
113
|
+
{{setVar "rm" (math (math circle.circle.R '+' circle.circle.r) '/' 2)}}
|
|
114
|
+
{{setVar "p" (polarToCartesian rm end.angle)}}
|
|
115
|
+
<text x="{{p.x}}" y="{{math p.y '-' 8}}" font-size="14" font-weight="500" fill="#6B7280" text-anchor="middle" transform="translate(-{{ternary @first ../circle.ticks.number.offset 0}}, -{{ternary @last ../circle.ticks.number.offset 0}})">{{end.number}}</text>
|
|
116
|
+
{{/with}}
|
|
117
|
+
</g>
|
|
118
|
+
</g>
|
|
119
|
+
</g>
|
|
120
|
+
|
|
121
|
+
{{!-- RAW 2 --}}
|
|
122
|
+
<g transform="translate(0, 232)">
|
|
123
|
+
{{!-- Section 4 --}}
|
|
124
|
+
<g transform="translate(284, 0)">
|
|
125
|
+
{{bar 544 40 (object tr=0 tl=0 bl=12 br=12) (toRad 0) fill="#F8FAFC" transform="translate(0, 362)"}}
|
|
126
|
+
{{bar 544 402 (object tr=12 tl=12 bl=12 br=12) (toRad 0) stroke="#CBD5E1" fill="none"}}
|
|
127
|
+
<g transform="translate(342.5, 362)">
|
|
128
|
+
{{bar 25 25 (object tr=8 br=8 bl=8 tl=8) (toRad 0) fill="none" stroke="#E2E8F0" transform="translate(-25, 7.5)"}}
|
|
129
|
+
<text x="-12.5" y="20" text-anchor="middle" dy="5" font-size="14" font-weight="500" fill="#475569">4</text>
|
|
130
|
+
<text x="-33" y="20" dy="5" font-size="14" font-weight="500" fill="#52525B">هماهنگی خانوادهها</text>
|
|
131
|
+
</g>
|
|
132
|
+
|
|
133
|
+
{{!-- Seperator --}}
|
|
134
|
+
<g>
|
|
135
|
+
<line x1="272" y1="24" x2="272" y2="84" stroke="#CBD5E1" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
136
|
+
<line x1="12" y1="116" x2="532" y2="116" stroke="#CBD5E1" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
137
|
+
<line x1="12" y1="240" x2="532" y2="240" stroke="#CBD5E1" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
138
|
+
</g>
|
|
139
|
+
|
|
140
|
+
{{!-- SubSection 1 --}}
|
|
141
|
+
<g transform="translate(0, 25)">
|
|
142
|
+
{{#with section4.first}}
|
|
143
|
+
<text x="27" y="29" dy="5" font-size="12" font-weight="400" fill="#4B5563" text-anchor="end">بخش اول</text>
|
|
144
|
+
<rect x="90" y="30" width="120" height="4" fill="#E5E7EB" />
|
|
145
|
+
{{bar (math 10 '*' total.mark) 12 (object tr=0 tl=2 bl=2 br=0) (toRad 0) fill="#15803D" transform="translate(90, 26)"}}
|
|
146
|
+
<line x1="{{math 90 '+' (math 10 '*' total.mark)}}" y1="24" x2="{{math 90 '+'(math 10 '*' total.mark)}}" y2="40" stroke="#15803D"/>
|
|
147
|
+
<text x="230" y="29" dy="5" font-size="12" font-weight="400" fill="#6B7280" text-anchor="end">12</text>
|
|
148
|
+
<text x="{{math 90 '+' (math 10 '*' total.mark)}}" y="2" dy="14" font-size="22" font-weight="500" fill="#15803D" text-anchor="middle">{{total.mark}}</text>
|
|
149
|
+
<text x="{{math 90 '+' (math 10 '*' total.mark)}}" y="48" dy="9.5" font-size="14" font-weight="400" fill="#4B5563" text-anchor="middle">%{{percentage.mark}}</text>
|
|
150
|
+
{{/with}}
|
|
151
|
+
</g>
|
|
152
|
+
|
|
153
|
+
{{!-- SubSection 4 --}}
|
|
154
|
+
<g transform="translate(303, 25)">
|
|
155
|
+
{{#with section4.fourth}}
|
|
156
|
+
<text x="0" y="29" dy="5" font-size="12" font-weight="400" fill="#6B7280">10</text>
|
|
157
|
+
<rect x="31" y="30" width="120" height="4" fill="#E5E7EB" />
|
|
158
|
+
{{bar (math 12 '*' total.mark) 12 (object tr=0 tl=2 bl=2 br=0) (toRad 0) fill="#15803D" transform="translate(-151, 26) rotate(180, 151, 6)"}}
|
|
159
|
+
<line x1="{{math 31 '+' (math 120 '-' (math 12 '*' total.mark))}}" y1="24" x2="{{math 31 '+' (math 120 '-' (math 12 '*' total.mark))}}" y2="40" stroke="#15803D"/>
|
|
160
|
+
<text x="159" y="29" dy="5" font-size="12" font-weight="400" fill="#4B5563" text-anchor="end">بخش چهارم</text>
|
|
161
|
+
<text x="{{math 31 '+' (math 120 '-' (math 12 '*' total.mark))}}" y="2" dy="14" font-size="22" font-weight="500" fill="#15803D" text-anchor="middle">{{total.mark}}</text>
|
|
162
|
+
<text x="{{math 31 '+' (math 120 '-' (math 12 '*' total.mark))}}" y="48" dy="9.5" font-size="14" font-weight="400" fill="#4B5563" text-anchor="middle">%{{percentage.mark}}</text>
|
|
163
|
+
{{/with}}
|
|
164
|
+
</g>
|
|
165
|
+
|
|
166
|
+
{{!-- SubSection 3 --}}
|
|
167
|
+
<g transform="translate(27, 148)">
|
|
168
|
+
{{#with section4.third}}
|
|
169
|
+
<text x="0" y="29" dy="5" font-size="12" font-weight="400" fill="#4B5563" text-anchor="end">بخش سوم</text>
|
|
170
|
+
<g transform="translate(100, 0)">
|
|
171
|
+
<g transform="translate(0, 3)">
|
|
172
|
+
<text x="91" y="10" font-size="14" dy="0.25em" font-weight="400" fill="#4B5563" text-anchor="start">همسانی خانوادهها</text>
|
|
173
|
+
<g transform="translate(98, 0)">
|
|
174
|
+
{{bar 64 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0) clipPath="url(#bar64x16)" fill="#EDE9FE"}}
|
|
175
|
+
{{bar (math 2 '*' family.mark) 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0) clip-path="url(#bar64x16)" fill="#8B5CF6"}}
|
|
176
|
+
<text x="70" y="10" dy="0.25em" text-anchor="start" direction="ltr">
|
|
177
|
+
<tspan font-size="16" font-weight="500" fill="#7C3AED">{{family.mark}}</tspan>
|
|
178
|
+
<tspan font-size="14" font-weight="400" dx="-3" fill="#4B5563">/ 32 </tspan>
|
|
179
|
+
</text>
|
|
180
|
+
<rect x="121" y="0" rx="4" fill="#F5F3FF" width="34" height="16" />
|
|
181
|
+
<text x="138" y="9" dy="0.25em" text-anchor="middle" font-weight="400" font-size="12" fill="#8B5CF6">%{{family.percentage}}</text>
|
|
182
|
+
</g>
|
|
183
|
+
</g>
|
|
184
|
+
<g transform="translate(0, 42)">
|
|
185
|
+
<text x="91" y="10" font-size="14" dy="0.25em" font-weight="400" fill="#4B5563" text-anchor="start">همسانی خانوادهها</text>
|
|
186
|
+
<g transform="translate(98, 0)">
|
|
187
|
+
{{bar 80 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0) clipPath="url(#bar80x16)" fill="#EDE9FE"}}
|
|
188
|
+
{{bar (math 2 '*' educational.mark) 16 (object tr=8 tl=0 br=8 bl=0) (toRad 0) clip-path="url(#bar80x16)" fill="#8B5CF6"}}
|
|
189
|
+
<text x="88" y="10" dy="0.25em" text-anchor="start" direction="ltr">
|
|
190
|
+
<tspan font-size="16" font-weight="500" fill="#7C3AED">{{educational.mark}}</tspan>
|
|
191
|
+
<tspan font-size="14" font-weight="400" dx="-3" fill="#4B5563">/ 40</tspan>
|
|
192
|
+
</text>
|
|
193
|
+
<rect x="140" y="0" rx="4" fill="#F5F3FF" width="34" height="16" />
|
|
194
|
+
<text x="157" y="9" dy="0.25em" text-anchor="middle" font-weight="400" font-size="12" fill="#8B5CF6">%{{educational.percentage}}</text>
|
|
195
|
+
</g>
|
|
196
|
+
</g>
|
|
197
|
+
<rect x="97" y="0" width="1" height="60" rx="0.25" fill="#FFFFFF" style="filter: drop-shadow(2px 0px 2px rgba(0,0,0, .5));"/>
|
|
198
|
+
</g>
|
|
199
|
+
<g transform="translate(409, 6)">
|
|
200
|
+
{{bar 48 48 (object tr=8 br=8 bl=8 tl=0) (toRad 0) fill="none" stroke="#EC4899" stroke-width="2"}}
|
|
201
|
+
<text x="24" y="10" font-size="20" dy=".75em" font-weight="500" fill="#EC4899" text-anchor="middle">{{total.mark}}</text>
|
|
202
|
+
|
|
203
|
+
<text x="24" y="29" font-size="12" dy=".75em" font-weight="400" fill="#6B7280" text-anchor="middle">%{{percentage.mark}}</text>
|
|
204
|
+
|
|
205
|
+
<text transform="translate(65, 23) rotate(-90, 0, 0)" font-size="12" font-weight="400" fill="#4B5563" text-anchor="middle">نمره کل</text>
|
|
206
|
+
|
|
207
|
+
</g>
|
|
208
|
+
{{/with}}
|
|
209
|
+
</g>
|
|
210
|
+
|
|
211
|
+
{{!-- Total --}}
|
|
212
|
+
<g transform="translate(39, 273)">
|
|
213
|
+
<text x="0" y="31.5" dy=".25em" font-size="14" font-weight="500" fill="#075985" text-anchor="end">نمره کل محور ۴</text>
|
|
214
|
+
<text x="448" y="31.5" dy=".25em" font-size="14" font-weight="400" fill="#374151" text-anchor="end">94</text>
|
|
215
|
+
<text x="{{math 103 '+' (math 3.5 '*' section4.total.total.mark)}}" y="50" dy=".75em" font-size="12" font-weight="400" fill="#4B5563" text-anchor="middle">%{{section4.total.total.mark}}</text>
|
|
216
|
+
<text x="{{math 103 '+' (math 3.5 '*' section4.total.total.mark)}}" y="0" dy=".75em" font-size="20" font-weight="500" fill="#075985" text-anchor="middle">{{section4.total.percentage.mark}}</text>
|
|
217
|
+
{{bar 4 24 (object tr=2 br=2 bl=2 tl=2) (toRad 0) fill="#E5E7EB" transform="translate(99, 20)"}}
|
|
218
|
+
<rect x="103" y="34" width="329" height="4" fill="#F3F4F6" />
|
|
219
|
+
{{bar (math 3.5 '*' section4.total.total.mark) 12 (object tr=12 tl=0 br=0 bl=0) (toRad 0) fill="url(#line-bar)" clip-path="url(#bar329x12)" transform="translate(103, 26)"}}
|
|
220
|
+
</g>
|
|
221
|
+
</g>
|
|
222
|
+
|
|
223
|
+
{{!-- Section 6 --}}
|
|
224
|
+
<g transform="translate(0, 0)">
|
|
225
|
+
{{bar 260 40 (object tr=0 tl=0 bl=12 br=12) (toRad 0) fill="#F8FAFC" transform="translate(0, 362)"}}
|
|
226
|
+
{{bar 260 402 (object tr=12 tl=12 bl=12 br=12) (toRad 0) stroke="#CBD5E1" fill="none"}}
|
|
227
|
+
<g transform="translate(229.5, 362)">
|
|
228
|
+
{{bar 25 25 (object tr=8 br=8 bl=8 tl=8) (toRad 0) fill="none" stroke="#E2E8F0" transform="translate(-25, 7.5)"}}
|
|
229
|
+
<text x="-12.5" y="20" text-anchor="middle" dy="5" font-size="14" font-weight="500" fill="#475569">6</text>
|
|
230
|
+
<text x="-33" y="20" dy="5" font-size="14" font-weight="500" fill="#52525B">احساس علاقهمندی و نگرانیها</text>
|
|
231
|
+
</g>
|
|
232
|
+
{{!-- SubSection 1 --}}
|
|
233
|
+
<g transform="translate(24.5, 26)">
|
|
234
|
+
<line x1="0" x2="212" y1="183.5" y2="183.5" stroke="#9CA3AF" />
|
|
235
|
+
<g transform="translate(5, 31)">
|
|
236
|
+
<text x="42.6" y="161" dy="1em" font-size="14" font-weight="400" fill="#A21CAF" text-anchor="middle">علاقهمندیها</text>
|
|
237
|
+
<text x="42.6" y="0" dy=".75" font-size="12" font-weight="400" fill="#6B7280" text-anchor="middle">32</text>
|
|
238
|
+
|
|
239
|
+
{{bar 10 128 (object tr=2 tl=2 br=0 bl=0) (toRad 0) fill="#F3F4F6" transform="translate(37.6, 24)" }}
|
|
240
|
+
{{bar 10 (math 4 '*' section6.favorites.total.mark) (object tr=0 tl=0 br=2 bl=2) (toRad 0) fill="#C026D3" transform="translate(37.6, 152) rotate(180, 5, 0)" }}
|
|
241
|
+
<text x="30" y="{{math 24 '+' (math 128 '-' (math 4 '*' section6.favorites.total.mark))}}" dy="-.75" font-size="14" font-weight="400" fill="#4B5563" text-anchor="start">%{{section6.favorites.percentage.mark}}</text>
|
|
242
|
+
<text x="56" y="{{math 24 '+' (math 128 '-' (math 4 '*' section6.favorites.total.mark))}}" dy="-.75" font-size="18" font-weight="500" fill="#C026D3" text-anchor="end">{{section6.favorites.total.mark}}</text>
|
|
243
|
+
</g>
|
|
244
|
+
<g transform="translate(125, -7.2)">
|
|
245
|
+
<text x="42.6" y="199.2" dy="1em" font-size="14" font-weight="400" fill="#C2410C" text-anchor="middle">نگرانیها</text>
|
|
246
|
+
<text x="42.6" y="{{ternary section6.worries.has_extend 0 7.2}}" dy=".75" font-size="12" font-weight="400" fill="#6B7280" text-anchor="middle">{{section6.worries.max}}</text>
|
|
247
|
+
{{bar 10 section6.worries.height (object tr=0 tl=0 br=2 bl=2) (toRad 0) fill="#F3F4F6" transform="translate(37.6, 190.2) rotate(180, 5, 0)" }}
|
|
248
|
+
{{bar 10 (math 1.2 '*' section6.worries.total.mark) (object tr=0 tl=0 br=2 bl=2) (toRad 0) fill="#EA580C" transform="translate(37.6, 190.2) rotate(180, 5, 0)" }}
|
|
249
|
+
<text x="30" y="{{math (ternary section6.worries.has_extend 27.2 31.2) '+' (math section6.worries.height '-' (math 1.2 '*' section6.worries.total.mark))}}" dy="-.75" font-size="14" font-weight="400" fill="#4B5563" text-anchor="start">%{{section6.worries.percentage.mark}}</text>
|
|
250
|
+
<text x="56" y="{{math (ternary section6.worries.has_extend 27.2 31.2) '+' (math section6.worries.height '-' (math 1.2 '*' section6.worries.total.mark))}}" dy="-.75" font-size="18" font-weight="500" fill="#EA580C" text-anchor="end">{{section6.worries.total.mark}}</text>
|
|
251
|
+
</g>
|
|
252
|
+
</g>
|
|
253
|
+
<line x1="12.5" x2="236" y1="254" y2="254" stroke="#CBD5E1" stroke-linecap="round" stroke-dasharray="6 6" />
|
|
254
|
+
{{!-- Total --}}
|
|
255
|
+
<g transform="translate(60.5, 268)">
|
|
256
|
+
<text x="40" y="0" dy="1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">نمره کل محور 6</text>
|
|
257
|
+
<g transform="translate(83, 40)">
|
|
258
|
+
{{#with section6.gauge}}
|
|
259
|
+
{{#with circle.circle}}
|
|
260
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=angles.end) direction clip-path="url(#raw-circle6-roll)" fill="#F4F4F5" stroke="#E4E4E7"}}
|
|
261
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=../zeta) direction clip-path="url(#raw-circle6-roll)" fill=../circle.fill fill-opacity=../raw.opacity}}
|
|
262
|
+
{{/with}}
|
|
263
|
+
<text x="0" y="0" text-anchor="middle" font-size="20" font-weight="500" fill="#475569">{{mark}}</text>
|
|
264
|
+
<text x="0" y="15" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">%{{percentage.mark}}</text>
|
|
265
|
+
|
|
266
|
+
{{setVar "rm" (math (math circle.circle.R '+' circle.circle.r) '/' 2)}}
|
|
267
|
+
{{setVar "p" (polarToCartesian rm end.angle)}}
|
|
268
|
+
<text x="{{math p.x '-' 23}}" y="{{math p.y '+' 5}}" font-size="12" font-weight="400" fill="#64748B" text-anchor="middle" transform="translate(-{{ternary @first ../circle.ticks.number.offset 0}}, -{{ternary @last ../circle.ticks.number.offset 0}})">{{end.number}}</text>
|
|
269
|
+
{{/with}}
|
|
270
|
+
</g>
|
|
271
|
+
</g>
|
|
272
|
+
|
|
273
|
+
</g>
|
|
274
|
+
|
|
275
|
+
</g>
|
|
276
|
+
</g>
|
|
277
|
+
{{/ layout}}
|