Skip to content

Commit

Permalink
Merge pull request #1074 from FormidableLabs/bug/time-scale-tooltips
Browse files Browse the repository at this point in the history
coerce values to numbers when calculating voronoi positions
  • Loading branch information
boygirl authored Aug 4, 2018
2 parents bccb7c1 + e0f8740 commit 7add545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/victory-voronoi-container/src/voronoi-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const VoronoiHelpers = {
const style = child ? child.props && child.props.style : props.style;
return data.map((datum, index) => {
const { x, y, y0, x0 } = Helpers.getPoint(datum);
const voronoiX = props.horizontal ? (y + y0) / 2 : (x + x0) / 2;
const voronoiY = props.horizontal ? (x + x0) / 2 : (y + y0) / 2;
const voronoiX = props.horizontal ? (+y + +y0) / 2 : (+x + +x0) / 2;
const voronoiY = props.horizontal ? (+x + +x0) / 2 : (+y + +y0) / 2;
return assign({
_voronoiX: props.voronoiDimension === "y" ? 0 : voronoiX,
_voronoiY: props.voronoiDimension === "x" ? 0 : voronoiY,
Expand Down

0 comments on commit 7add545

Please sign in to comment.