Skip to content

Commit ffbf281

Browse files
bw2phildarnowsky-broad
authored andcommitted
updated Q legend labels
1 parent dd7aeff commit ffbf281

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

browser/src/ShortTandemRepeatPage/ShortTandemRepeatAlleleSizeDistributionPlot.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ const qualityDescriptionLabels: Record<GenotypeQuality, string> = {
122122
}
123123

124124
const qScoreLabels: Record<QScoreBin, string> = {
125-
'0.0': '0',
126-
'0.1': '0 < q ≤ 0.1',
127-
'0.2': '0.1 < q ≤ 0.2',
128-
'0.3': '0.2 < q ≤ 0.3',
129-
'0.4': '0.3 < q ≤ 0.4',
130-
'0.5': '0.4 < q ≤ 0.5',
131-
'0.6': '0.5 < q ≤ 0.6',
132-
'0.7': '0.6 < q ≤ 0.7',
133-
'0.8': '0.7 < q ≤ 0.8',
134-
'0.9': '0.8 < q ≤ 0.9',
135-
'1': '0.9 < q ≤ 1',
125+
'0.0': '0 to 0.05',
126+
'0.1': '0.05 to 0.15',
127+
'0.2': '0.15 to 0.25',
128+
'0.3': '0.25 to 0.35',
129+
'0.4': '0.35 to 0.45',
130+
'0.5': '0.45 to 0.55',
131+
'0.6': '0.55 to 0.65',
132+
'0.7': '0.65 to 0.75',
133+
'0.8': '0.75 to 0.85',
134+
'0.9': '0.85 to 0.95',
135+
'1': '0.95 to 1',
136136
}
137137

138138
const fixedLegendLabels: Partial<Record<ColorBy, Record<string, string>>> = {
@@ -199,7 +199,14 @@ const LegendFromColorBy = ({ colorBy }: { colorBy: ColorBy | '' }) => {
199199
const labels = legendLabels(colorBy, [...keys])
200200
const colors = keys.map((key) => colorMap[colorBy][key])
201201
const scale = scaleOrdinal().domain(labels).range(colors)
202-
return <LegendOrdinal scale={scale} direction="row" />
202+
return (
203+
<LegendOrdinal
204+
scale={scale}
205+
shapeMargin="0 7px 20px 0px"
206+
labelMargin="0 10px 20px 0px"
207+
direction="row"
208+
/>
209+
)
203210
}
204211

205212
const tooltipContent = (data: Bin, key: ColorByValue | ''): string => {

0 commit comments

Comments
 (0)