From 9c695ff60965673e9a8a786f4949fc971fd16106 Mon Sep 17 00:00:00 2001 From: Elijah Meeks Date: Fri, 15 Dec 2017 18:38:19 -0800 Subject: [PATCH] summaryType bugfixes Horizontal joy plots were slightly off and contour plots needed more margin. Oh and all horizontal summary charts were flipped. --- src/components/svg/summaryLayouts.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/svg/summaryLayouts.js b/src/components/svg/summaryLayouts.js index 3c54def7..c75395d9 100644 --- a/src/components/svg/summaryLayouts.js +++ b/src/components/svg/summaryLayouts.js @@ -648,8 +648,8 @@ export function contourRenderFn({ data: projectedOrd, projectedX: "x", projectedY: "y", - finalXExtent: [0, adjustedSize[0]], - finalYExtent: [0, adjustedSize[1]] + finalXExtent: [0, adjustedSize[0] + margin.left + margin.right], + finalYExtent: [0, adjustedSize[1] + margin.top + margin.bottom] }) const contourMarks = [] oContours.forEach((d, i) => { @@ -763,7 +763,9 @@ export function bucketizedRenderingFn({ // binBuckets.push(binDomain[1]); const xyValue = - projection === "vertical" ? p => p.xy.y : p => p.piece._orFRVertical + projection === "vertical" + ? p => p.piece._orFRVertical + : p => p.piece._orFR let calculatedBins = violinHist .domain(binDomain) @@ -1008,7 +1010,7 @@ export function bucketizedRenderingFn({ if (projection === "horizontal") { joyBins.forEach((summaryPoint, i) => { - const xValue = summaryPoint.y + const xValue = summaryPoint.y - bucketSize const yValue = -summaryPoint.value / actualMax * (columnWidth + joyHeight) + columnWidth / 2