Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit a8942fa

Browse files
committed
fix: added number formatter
1 parent fa247bc commit a8942fa

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dmriprepViewer/src/components/GroupStats.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
<p class="lead">
55
Comparison to Group Eddy_Quad Statistics
66
</p>
7-
<p>Absolute Motion (z-score)</p>
7+
<p>Absolute Motion (Z = {{numberFormatter(individual_abs_mot_z)}})</p>
88
<b-progress class="w-50 mx-auto">
99
<b-progress-bar :value="scaleZ(individual_abs_mot_z)"
1010
:variant="getColor(0, individual_abs_mot_z)">
11-
z = {{individual_abs_mot_z}}
11+
z = {{numberFormatter(individual_abs_mot_z)}}
1212
</b-progress-bar>
1313
</b-progress>
1414
</div>
1515
<div class="mb-3">
16-
<p>Relative Motion (z-score)</p>
16+
<p>Relative Motion (Z = {{numberFormatter(individual_rel_mot_z)}})</p>
1717
<b-progress class="w-50 mx-auto">
1818
<b-progress-bar :value="scaleZ(individual_rel_mot_z)"
1919
:variant="getColor(0, individual_rel_mot_z)">
20-
z = {{individual_rel_mot_z}}
20+
z = {{numberFormatter(individual_rel_mot_z)}}
2121
</b-progress-bar>
2222
</b-progress>
2323
</div>
@@ -42,6 +42,10 @@ export default {
4242
const scaler = d3.scaleLinear().range([0, 100]).domain([-3, 3]);
4343
return scaler(val);
4444
},
45+
numberFormatter(val) {
46+
const formatter = d3.format('.3n');
47+
return formatter(val);
48+
},
4549
getColor(direction, zScore) {
4650
if (direction) {
4751
console.log(zScore);

0 commit comments

Comments
 (0)