@baravak/risloo-profile-cli 4.8.0 → 4.9.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baravak/risloo-profile-cli",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "**Risloo Profile CLI** is a library for creating profiles, reports and sheets for *psychological* samples.",
5
5
  "main": "bin/risloo.js",
6
6
  "publishConfig": {
@@ -0,0 +1,416 @@
1
+ {
2
+ "id": "$X1HEQLUM6",
3
+ "scale": {
4
+ "id": "$PIOS-93",
5
+ "title": "پرسشنامه وسواس مذهبی اخلاقی پن"
6
+ },
7
+ "chain": null,
8
+ "version": "1",
9
+ "edition": "",
10
+ "edition_version": null,
11
+ "client": {
12
+ "id": "GH96XXXX",
13
+ "name": "مراجع"
14
+ },
15
+ "room": {
16
+ "id": "RS96XXXX",
17
+ "manager": {
18
+ "id": "GH96XXXXX",
19
+ "name": "درمانگر"
20
+ },
21
+ "center": {
22
+ "id": "RS96XXXX",
23
+ "acceptation": null,
24
+ "status": "active",
25
+ "type": "counseling_center",
26
+ "detail": {
27
+ "title": "مرکز درمانی"
28
+ }
29
+ },
30
+ "acceptation": null,
31
+ "status": "active",
32
+ "type": "room"
33
+ },
34
+ "case": null,
35
+ "code": null,
36
+ "created_at": 1719988509,
37
+ "started_at": 1719988515,
38
+ "scored_at": 1719989085,
39
+ "closed_at": 1719988515,
40
+ "total_amount": null,
41
+ "prepayment": false,
42
+ "purchased": true,
43
+ "amount": null,
44
+ "billing": null,
45
+ "description": "## دستور اجرای آزمون\n\nعبارات زیر درباره حالاتی است که برخی اوقات به افراد دست می‌دهد. لطفاً مشخص کنید که هر چند وقت یک‌بار این حالات را تجربه می‌کنید.",
46
+ "psychologist_description": null,
47
+ "items": [
48
+ {
49
+ "type": "text",
50
+ "text": "من نگرانم که افکار نادرست به ذهنم خطور کند.",
51
+ "answer": {
52
+ "type": "optional",
53
+ "options": [
54
+ "هرگز",
55
+ "تقریباً هیچ‌گاه",
56
+ "گاهی اوقات",
57
+ "اغلب اوقات",
58
+ "همیشه"
59
+ ]
60
+ },
61
+ "user_answered": "1"
62
+ },
63
+ {
64
+ "type": "text",
65
+ "text": "من می ترسم که فرد خبیثی باشم.",
66
+ "answer": {
67
+ "type": "optional",
68
+ "options": [
69
+ "هرگز",
70
+ "تقریباً هیچ‌گاه",
71
+ "گاهی اوقات",
72
+ "اغلب اوقات",
73
+ "همیشه"
74
+ ]
75
+ },
76
+ "user_answered": "1"
77
+ },
78
+ {
79
+ "type": "text",
80
+ "text": "من می ترسم که رفتاری غیر اخلاقی از من سربزند.",
81
+ "answer": {
82
+ "type": "optional",
83
+ "options": [
84
+ "هرگز",
85
+ "تقریباً هیچ‌گاه",
86
+ "گاهی اوقات",
87
+ "اغلب اوقات",
88
+ "همیشه"
89
+ ]
90
+ },
91
+ "user_answered": "4"
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "من شدیدا نیاز دارم که بارها و بارها به خاطر گناهانم استغفار بطلبم.",
96
+ "answer": {
97
+ "type": "optional",
98
+ "options": [
99
+ "هرگز",
100
+ "تقریباً هیچ‌گاه",
101
+ "گاهی اوقات",
102
+ "اغلب اوقات",
103
+ "همیشه"
104
+ ]
105
+ },
106
+ "user_answered": "4"
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "من درباره بهشت یا جهنم رفتن نگرانم.",
111
+ "answer": {
112
+ "type": "optional",
113
+ "options": [
114
+ "هرگز",
115
+ "تقریباً هیچ‌گاه",
116
+ "گاهی اوقات",
117
+ "اغلب اوقات",
118
+ "همیشه"
119
+ ]
120
+ },
121
+ "user_answered": "4"
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "من نگرانم که اگر در همه مواقع مطابق اصول اخلاقی رفتار نکنم، تنبیه شوم.",
126
+ "answer": {
127
+ "type": "optional",
128
+ "options": [
129
+ "هرگز",
130
+ "تقریباً هیچ‌گاه",
131
+ "گاهی اوقات",
132
+ "اغلب اوقات",
133
+ "همیشه"
134
+ ]
135
+ },
136
+ "user_answered": "2"
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "احساس گناه مانع می شود که من از چیزهایی که دوست دارم لذت ببرم.",
141
+ "answer": {
142
+ "type": "optional",
143
+ "options": [
144
+ "هرگز",
145
+ "تقریباً هیچ‌گاه",
146
+ "گاهی اوقات",
147
+ "اغلب اوقات",
148
+ "همیشه"
149
+ ]
150
+ },
151
+ "user_answered": "3"
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "افکار غیراخلاقی به ذهنم خطور می کنند و من نمی توانم از آنها خلاص شوم.",
156
+ "answer": {
157
+ "type": "optional",
158
+ "options": [
159
+ "هرگز",
160
+ "تقریباً هیچ‌گاه",
161
+ "گاهی اوقات",
162
+ "اغلب اوقات",
163
+ "همیشه"
164
+ ]
165
+ },
166
+ "user_answered": "1"
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "من می‌ترسم که رفتارم مورد پذیرش خداوند قرار نگیرد.",
171
+ "answer": {
172
+ "type": "optional",
173
+ "options": [
174
+ "هرگز",
175
+ "تقریباً هیچ‌گاه",
176
+ "گاهی اوقات",
177
+ "اغلب اوقات",
178
+ "همیشه"
179
+ ]
180
+ },
181
+ "user_answered": "4"
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "من می‌ترسم که بدون آنکه متوجه بوده باشم رفتار ناشایستی از من سر زده باشد.",
186
+ "answer": {
187
+ "type": "optional",
188
+ "options": [
189
+ "هرگز",
190
+ "تقریباً هیچ‌گاه",
191
+ "گاهی اوقات",
192
+ "اغلب اوقات",
193
+ "همیشه"
194
+ ]
195
+ },
196
+ "user_answered": "4"
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "من باید به سختی تلاش کنم تا از برخی افکار غیراخلاقی دوری گزینم.",
201
+ "answer": {
202
+ "type": "optional",
203
+ "options": [
204
+ "هرگز",
205
+ "تقریباً هیچ‌گاه",
206
+ "گاهی اوقات",
207
+ "اغلب اوقات",
208
+ "همیشه"
209
+ ]
210
+ },
211
+ "user_answered": "4"
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "من بسیار نگرانم که کارهایی که انجام داده‌ام نادرست بوده باشند.",
216
+ "answer": {
217
+ "type": "optional",
218
+ "options": [
219
+ "هرگز",
220
+ "تقریباً هیچ‌گاه",
221
+ "گاهی اوقات",
222
+ "اغلب اوقات",
223
+ "همیشه"
224
+ ]
225
+ },
226
+ "user_answered": "1"
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "من می ترسم که از دستورات خداوند سرپیچی کنم.",
231
+ "answer": {
232
+ "type": "optional",
233
+ "options": [
234
+ "هرگز",
235
+ "تقریباً هیچ‌گاه",
236
+ "گاهی اوقات",
237
+ "اغلب اوقات",
238
+ "همیشه"
239
+ ]
240
+ },
241
+ "user_answered": "3"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "من از داشتن افکار جنسی هراس دارم.",
246
+ "answer": {
247
+ "type": "optional",
248
+ "options": [
249
+ "هرگز",
250
+ "تقریباً هیچ‌گاه",
251
+ "گاهی اوقات",
252
+ "اغلب اوقات",
253
+ "همیشه"
254
+ ]
255
+ },
256
+ "user_answered": "2"
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "من می‌ترسم که هیچگاه رابطه خوبی با خداوند نداشته باشم.",
261
+ "answer": {
262
+ "type": "optional",
263
+ "options": [
264
+ "هرگز",
265
+ "تقریباً هیچ‌گاه",
266
+ "گاهی اوقات",
267
+ "اغلب اوقات",
268
+ "همیشه"
269
+ ]
270
+ },
271
+ "user_answered": "1"
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "من به خاطر افکار غیراخلاقی که داشته‌ام احساس گناه می‌کنم.",
276
+ "answer": {
277
+ "type": "optional",
278
+ "options": [
279
+ "هرگز",
280
+ "تقریباً هیچ‌گاه",
281
+ "گاهی اوقات",
282
+ "اغلب اوقات",
283
+ "همیشه"
284
+ ]
285
+ },
286
+ "user_answered": "2"
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "من نگرانم که خداوند از دست من ناراحت باشد.",
291
+ "answer": {
292
+ "type": "optional",
293
+ "options": [
294
+ "هرگز",
295
+ "تقریباً هیچ‌گاه",
296
+ "گاهی اوقات",
297
+ "اغلب اوقات",
298
+ "همیشه"
299
+ ]
300
+ },
301
+ "user_answered": "3"
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "من از داشتن افکار غیراخلاقی هراس دارم.",
306
+ "answer": {
307
+ "type": "optional",
308
+ "options": [
309
+ "هرگز",
310
+ "تقریباً هیچ‌گاه",
311
+ "گاهی اوقات",
312
+ "اغلب اوقات",
313
+ "همیشه"
314
+ ]
315
+ },
316
+ "user_answered": "4"
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "من می‌ترسم که افکارم مورد پذیرش خداوند قرار نگیرند.",
321
+ "answer": {
322
+ "type": "optional",
323
+ "options": [
324
+ "هرگز",
325
+ "تقریباً هیچ‌گاه",
326
+ "گاهی اوقات",
327
+ "اغلب اوقات",
328
+ "همیشه"
329
+ ]
330
+ },
331
+ "user_answered": "3"
332
+ }
333
+ ],
334
+ "prerequisites": [
335
+ {
336
+ "type": "text",
337
+ "label": "gender",
338
+ "text": "جنسیت",
339
+ "answer": {
340
+ "type": "select",
341
+ "options": [
342
+ "زن",
343
+ "مرد"
344
+ ]
345
+ },
346
+ "alias": "gender",
347
+ "force": true,
348
+ "user_answered": "2"
349
+ },
350
+ {
351
+ "type": "text",
352
+ "label": "age",
353
+ "text": "سن",
354
+ "answer": {
355
+ "type": "number"
356
+ },
357
+ "alias": "age",
358
+ "force": true,
359
+ "user_answered": "8"
360
+ },
361
+ {
362
+ "type": "text",
363
+ "label": "education",
364
+ "text": "تحصیلات",
365
+ "answer": {
366
+ "type": "select",
367
+ "options": [
368
+ "ابتدایی اول",
369
+ "ابتدایی دوم",
370
+ "متوسطه اول",
371
+ "متوسطه دوم",
372
+ "دیپلم",
373
+ "کارشناسی",
374
+ "کارشناسی ارشد",
375
+ "پزشکی عمومی",
376
+ "متخصص",
377
+ "دکتری تخصصی",
378
+ "حوزوی مقدمات",
379
+ "حوزوی سطح۱",
380
+ "حوزوی سطح۲",
381
+ "حوزوی سطح۳",
382
+ "حوزوی سطح۴"
383
+ ]
384
+ },
385
+ "alias": "education",
386
+ "force": true,
387
+ "user_answered": "10"
388
+ },
389
+ {
390
+ "type": "text",
391
+ "label": "marital_status",
392
+ "text": "وضعیت تأهل",
393
+ "answer": {
394
+ "type": "select",
395
+ "options": [
396
+ "مجرد",
397
+ "متأهل"
398
+ ]
399
+ },
400
+ "alias": "marital_status",
401
+ "force": true,
402
+ "user_answered": "2"
403
+ }
404
+ ],
405
+ "cornometer": 0,
406
+ "score": {
407
+ "total": 32,
408
+ "total_percentage": 0.421,
409
+ "fear_of_sin": 16,
410
+ "fear_of_sin_percentage": 0.364,
411
+ "fear_of_god": 16,
412
+ "fear_of_god_percentage": 0.5
413
+ },
414
+ "score_current_version": "1.0.0",
415
+ "score_last_version": "1.0.0"
416
+ }
@@ -0,0 +1,95 @@
1
+ const { Profile, FS } = require("../Profile");
2
+
3
+
4
+ class PIOS93 extends Profile {
5
+ // Number of pages
6
+ static pages = 1;
7
+
8
+ // Labels of the sample
9
+ labels = {
10
+ L0: { eng: "total", fr: "نمره کل", max:76, color:"#475569", bg:"#F1F5F9"},
11
+ L1: { eng: "total_percentage"},
12
+
13
+ L2: { eng: "fear_of_sin", fr: "ترس از گناه", max:44, color:"#BE185D", bg:"#FDF2F8"},
14
+ L3: { eng: "fear_of_sin_percentage"},
15
+
16
+ L4: { eng: "fear_of_god", fr: "ترس از خدا", max:32, color:"#4338CA", bg:"#EEF2FF"},
17
+ L5: { eng: "fear_of_god_percentage"},
18
+
19
+ };
20
+
21
+ profileSpec = {
22
+ /* "sample" determines some important info about the sample and profile */
23
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
24
+ /* "prerequisites" is synonym to "fields" in our program */
25
+ sample: {
26
+ name: "پرسشنامه وسواس مذهبی اخلاقی پن" /* Name of the sample */,
27
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
28
+ questions: true /* Determines whether to get questions from inital dataset or not */,
29
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
30
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
31
+ },
32
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
33
+ /* calculating its dimensions carefully is of great importance */
34
+ profile: {
35
+ get dimensions() {
36
+ return {
37
+ width: 401 + 2 * this.padding.x,
38
+ height: 501 + 2 * this.padding.y,
39
+ };
40
+ },
41
+ padding: {
42
+ x: 251,
43
+ y: 106.5,
44
+ },
45
+ },
46
+ /* "labels" part which has to be provided for each profile */
47
+ labels: Object.values(this.labels),
48
+ };
49
+ circle (data){
50
+ data.mark = data.mark?? 0;
51
+ data.percentage = data.percentage?? 0;
52
+ const circleData = {
53
+ R: 80 ,
54
+ r: 80 * .7,
55
+ angles: {
56
+ start: FS.toRadians(-90),
57
+ end: FS.toRadians(180),
58
+ },
59
+ direction: false,
60
+ get totalAngle() {
61
+ return this.direction
62
+ ? 2 * Math.PI - (this.angles.end - this.angles.start)
63
+ : this.angles.end - this.angles.start;
64
+ },
65
+ }
66
+ return {
67
+ circle: circleData,
68
+ mark: data.mark,
69
+ label: data.label.fr,
70
+ bg: data.label.bg,
71
+ color: data.label.color,
72
+ max: data.label.max,
73
+ percentage: Math.round(data.percentage * 100),
74
+ zeta: (data.mark / data.label.max) * circleData.totalAngle + circleData.angles.start,
75
+ };
76
+ }
77
+ constructor(dataset, options, config = {}) {
78
+ super();
79
+ this._init(dataset, options, config);
80
+ }
81
+ _calcContext() {
82
+ const {
83
+ dataset,
84
+ } = this;
85
+ return [{
86
+ total: this.circle({...dataset.score[0], percentage: dataset.score[1].mark}),
87
+ sin: this.circle({...dataset.score[2], percentage: dataset.score[3].mark}),
88
+ god: this.circle({...dataset.score[4], percentage: dataset.score[5].mark}),
89
+ }];
90
+ }
91
+ }
92
+
93
+
94
+
95
+ module.exports = PIOS93;
@@ -39,7 +39,7 @@
39
39
  <stop offset="1" stop-color="#E11D48"/>
40
40
  </linearGradient>
41
41
  <clipPath id="defaultBar">
42
- {{bar 360 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
42
+ {{bar 300 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
43
43
  </clipPath>
44
44
  </defs>
45
45
  <g transform="translate(4, 20)">
@@ -52,16 +52,16 @@
52
52
  <rect x="36.5" y=".5" width="47" height="79" stroke="{{item.style.border}}" fill="{{item.style.bg}}" rx="4" />
53
53
  <line x1="3" x2="33" y1="40" y2="40" stroke="{{item.style.border}}" />
54
54
  <text x="18" y="22" text-anchor="middle" dy=".3em" font-size="13" font-weight="500" fill="{{item.style.color}}" class="eng-font">{{item.label}}</text>
55
- <text x="18" y="58" text-anchor="middle" dy=".3em" font-size="13" font-weight="600" fill="{{item.style.color}}" class="eng-font">{{item.br}}</text>
55
+ <text x="18" y="58" text-anchor="middle" dy=".3em" font-size="13" font-weight="600" fill="{{item.style.color}}">{{item.br}}</text>
56
56
  <text text-anchor="middle" dy=".3em" font-size="13" font-weight="500" fill="{{item.style.color}}" transform="rotate(-90) translate(-40, 60)">{{item.fa}}</text>
57
57
  </g>
58
58
  {{#each item.subs as | sub isub |}}
59
59
  <g transform="translate(0, {{math 28 '*' isub}})">
60
- <text y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">{{sub.fa}}</text>
61
- <text x="13" y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">-</text>
60
+ <text y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}">{{sub.fa}}</text>
61
+ <text x="13" y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}">-</text>
62
62
  <text x="37" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">{{sub.label}}</text>
63
63
  <rect x="370" width="36" height="16" rx="2" fill="{{sub.style.bg}}" />
64
- <text x="388" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="400" fill="{{sub.style.color}}" class="eng-font">{{sub.raw}}</text>
64
+ <text x="388" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="400" fill="{{sub.style.color}}">{{sub.raw}}</text>
65
65
  {{bar 300 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=sub.style.bg transform="translate(57, 0)"}}
66
66
  </g>
67
67
 
@@ -97,6 +97,11 @@
97
97
  {{#each item.subs as | sub isub |}}
98
98
  <g transform="translate(0, {{math (math 104 '*' index) '+' (math 28 '*' isub)}})">
99
99
  {{bar sub.pixel 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=sub.style.key transform="translate(57, 0)"}}
100
+ {{#if (boolean sub.br '>=' 75)}}
101
+ <text x="{{math 51 '+' sub.pixel}}" y="8" text-anchor="start" dy=".3em" font-size="15" font-weight="500" fill="#FFFFFF">{{sub.br}}</text>
102
+ {{else}}
103
+ <text x="{{math 63 '+' sub.pixel}}" y="8" text-anchor="end" dy=".3em" font-size="15" font-weight="500" fill="{{sub.style.color}}">{{sub.br}}</text>
104
+ {{/if}}
100
105
  </g>
101
106
  {{/each}}
102
107
  {{/each}}
@@ -39,7 +39,7 @@
39
39
  <stop offset="1" stop-color="#E11D48"/>
40
40
  </linearGradient>
41
41
  <clipPath id="defaultBar">
42
- {{bar 360 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
42
+ {{bar 300 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
43
43
  </clipPath>
44
44
  </defs>
45
45
  <g transform="translate(4, 20)">
@@ -52,16 +52,16 @@
52
52
  <rect x="36.5" y=".5" width="47" height="79" stroke="{{item.style.border}}" fill="{{item.style.bg}}" rx="4" />
53
53
  <line x1="3" x2="33" y1="40" y2="40" stroke="{{item.style.border}}" />
54
54
  <text x="18" y="22" text-anchor="middle" dy=".3em" font-size="13" font-weight="500" fill="{{item.style.color}}" class="eng-font">{{item.label}}</text>
55
- <text x="18" y="58" text-anchor="middle" dy=".3em" font-size="13" font-weight="600" fill="{{item.style.color}}" class="eng-font">{{item.br}}</text>
55
+ <text x="18" y="58" text-anchor="middle" dy=".3em" font-size="13" font-weight="600" fill="{{item.style.color}}">{{item.br}}</text>
56
56
  <text text-anchor="middle" dy=".3em" font-size="13" font-weight="500" fill="{{item.style.color}}" transform="rotate(-90) translate(-40, 60)">{{item.fa}}</text>
57
57
  </g>
58
58
  {{#each item.subs as | sub isub |}}
59
59
  <g transform="translate(0, {{math 28 '*' isub}})">
60
- <text y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">{{sub.fa}}</text>
61
- <text x="13" y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">-</text>
60
+ <text y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}">{{sub.fa}}</text>
61
+ <text x="13" y="8" text-anchor="start" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}">-</text>
62
62
  <text x="37" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="{{sub.style.weight}}" fill="{{sub.style.color}}" class="eng-font">{{sub.label}}</text>
63
63
  <rect x="370" width="36" height="16" rx="2" fill="{{sub.style.bg}}" />
64
- <text x="388" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="400" fill="{{sub.style.color}}" class="eng-font">{{sub.raw}}</text>
64
+ <text x="388" y="8" text-anchor="middle" dy=".3em" font-size="13" font-weight="400" fill="{{sub.style.color}}">{{sub.raw}}</text>
65
65
  {{bar 300 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=sub.style.bg transform="translate(57, 0)"}}
66
66
  </g>
67
67
 
@@ -97,6 +97,11 @@
97
97
  {{#each item.subs as | sub isub |}}
98
98
  <g transform="translate(0, {{math (math 104 '*' index) '+' (math 28 '*' isub)}})">
99
99
  {{bar sub.pixel 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) fill=sub.style.key transform="translate(57, 0)"}}
100
+ {{#if (boolean sub.br '>=' 75)}}
101
+ <text x="{{math 51 '+' sub.pixel}}" y="8" text-anchor="start" dy=".3em" font-size="15" font-weight="500" fill="#FFFFFF">{{sub.br}}</text>
102
+ {{else}}
103
+ <text x="{{math 63 '+' sub.pixel}}" y="8" text-anchor="end" dy=".3em" font-size="15" font-weight="500" fill="{{sub.style.color}}">{{sub.br}}</text>
104
+ {{/if}}
100
105
  </g>
101
106
  {{/each}}
102
107
  {{/each}}
@@ -0,0 +1,39 @@
1
+ {{#> layout}}
2
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
3
+ <g transform="translate(80,80)">
4
+ {{#with god}}
5
+ {{gauge circle.R circle.r (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill=bg}}
6
+ {{gauge circle.R circle.r (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill=color}}
7
+ <text y="-10" text-anchor="middle" dy=".3em" font-size="32" font-weight="500" fill="{{color}}">٪{{percentage}}</text>
8
+ <text y="20" text-anchor="middle" dy=".3em" font-size="22" font-weight="400" fill="{{color}}">{{mark}}</text>
9
+ <text y="-68" x="-12" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">0</text>
10
+ <text y="-14" x="-68" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">{{max}}</text>
11
+ <text y="98" text-anchor="middle" dy=".90em" font-size="18" font-weight="500" fill="{{color}}">{{label}}</text>
12
+ {{/with}}
13
+ </g>
14
+ <g transform="translate(340,80)">
15
+ {{#with sin}}
16
+ {{gauge circle.R circle.r (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill=bg}}
17
+ {{gauge circle.R circle.r (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill=color}}
18
+ <text y="-10" text-anchor="middle" dy=".3em" font-size="32" font-weight="500" fill="{{color}}">٪{{percentage}}</text>
19
+ <text y="20" text-anchor="middle" dy=".3em" font-size="22" font-weight="400" fill="{{color}}">{{mark}}</text>
20
+ <text y="-68" x="-12" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">0</text>
21
+ <text y="-14" x="-68" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">{{max}}</text>
22
+ <text y="98" text-anchor="middle" dy=".90em" font-size="18" font-weight="500" fill="{{color}}">{{label}}</text>
23
+ {{/with}}
24
+ </g>
25
+ <line x1="0" x2="400" y1="250" y2="250" stroke="#D1D5DB" />
26
+ <g transform="translate(200.5,379)">
27
+ {{#with total}}
28
+ {{gauge circle.R circle.r (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill=bg}}
29
+ {{gauge circle.R circle.r (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill=color}}
30
+ <text y="-10" text-anchor="middle" dy=".3em" font-size="32" font-weight="500" fill="{{color}}">٪{{percentage}}</text>
31
+ <text y="20" text-anchor="middle" dy=".3em" font-size="22" font-weight="400" fill="{{color}}">{{mark}}</text>
32
+ <text y="-68" x="-12" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">0</text>
33
+ <text y="-14" x="-68" text-anchor="middle" dy=".3em" font-size="16" font-weight="400" fill="#94A3B8">{{max}}</text>
34
+ <text y="98" text-anchor="middle" dy=".90em" font-size="18" font-weight="500" fill="{{color}}">{{label}}</text>
35
+ {{/with}}
36
+ </g>
37
+ </g>
38
+
39
+ {{/layout}}