Skip to content

Commit

Permalink
add log label for x axis
Browse files Browse the repository at this point in the history
  • Loading branch information
elissa-alarmani committed Sep 6, 2024
1 parent b804dbe commit 51e48c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion browser/src/VariantPage/VariantSiteQualityMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,10 @@ const SiteQualityMetricsHistogram = ({
}: SiteQualityMetricsHistogramProps) => {
const isLogScale = metric === 'SiteQuality' || metric === 'AS_QUALapprox' || metric === 'DP'

const logLabels = ['AS_VarDP', 'QUALapprox', 'AS_QUALapprox']

const xLabelRenamed = logLabels.includes(xLabel) ? `log(${xLabel})` : xLabel

const primaryValues = exomeBinValues || genomeBinValues
const secondaryValues = exomeBinValues ? genomeBinValues : null

Expand Down Expand Up @@ -777,7 +781,7 @@ const SiteQualityMetricsHistogram = ({
stroke="#333"
/>
<AxisBottom
label={xLabel}
label={xLabelRenamed}
labelOffset={30}
// @ts-expect-error TS(2322) FIXME: Type '{ fontSize: number; textAnchor: string; }' i... Remove this comment to see the full error message
labelProps={labelProps}
Expand Down

0 comments on commit 51e48c0

Please sign in to comment.