diff --git a/src/packages/@ncigdc/components/SurvivalPlotWrapper.js b/src/packages/@ncigdc/components/SurvivalPlotWrapper.js
index f7b0b8c0e..a2b29ad6e 100644
--- a/src/packages/@ncigdc/components/SurvivalPlotWrapper.js
+++ b/src/packages/@ncigdc/components/SurvivalPlotWrapper.js
@@ -70,7 +70,7 @@ const colors = scaleOrdinal(schemeCategory10);
const styles = {
pValue: {
fontSize: '1.1rem',
- height: '1.5rem',
+ lineHeight: '1.5rem',
marginTop: '0.5rem',
textAlign: 'center',
},
@@ -221,7 +221,7 @@ const SurvivalPlotWrapper = ({
the precision inherent in the code
- )
+ )
}
>
@@ -289,7 +289,7 @@ function renderSurvivalPlot(props: TProps): void {
onMouseEnterDonor: (
e,
{
- survivalEstimate, time = 0, censored, submitter_id, project_id,
+ censored, project_id, submitter_id, survivalEstimate, time = 0,
}
) => {
setTooltip(
diff --git a/src/packages/@ncigdc/utils/wrapSvg.js b/src/packages/@ncigdc/utils/wrapSvg.js
index 60b28f5f5..5d4f70d74 100644
--- a/src/packages/@ncigdc/utils/wrapSvg.js
+++ b/src/packages/@ncigdc/utils/wrapSvg.js
@@ -67,7 +67,7 @@ function buildForeignObject({
}): { html: string, height: number } {
const foreignObjects = elements.filter(Boolean);
// $FlowIgnore
- const elementsHeight = sum(foreignObjects.map(e => e.offsetHeight || 15));
+ const elementsHeight = sum(foreignObjects.map(e => (e.className === 'p-value' ? 25 : e.offsetHeight || 17)));
return {
height: elementsHeight,
@@ -175,10 +175,10 @@ const wrapSvg = ({
22,
])}"
viewBox="0 0 ${width} ${sum([
- height,
- afterObject.height,
- 22,
-])}"
+ height,
+ afterObject.height,
+ 22,
+ ])}"
style="font-size: 10px"
class="${EXPORT_CLASS} ${svgClass || ''} ${className}"
>
@@ -191,14 +191,14 @@ const wrapSvg = ({
${beforeObject.html}
${rightObject.html}
+ titleHeight,
+ margins.top,
+ beforeObject.height,
+ ])})">
${svg.innerHTML.replace(
- /url\(['"]?https?:\/\/[^#]+(#.+)['"]?\)/g,
- 'url($1)',
- )}
+ /url\(['"]?https?:\/\/[^#]+(#.+)['"]?\)/g,
+ 'url($1)',
+ )}
${afterObject.html}
${legends