Function: squarePath()
squarePath(
s):string
Defined in: packages/sdvplot/src/bins/squarebin.ts:118
An SVG path for a square of side s centred on the current point, drawn the way hexagonPath is:
selection.attr("transform", translate(cx, cy)).attr("d", squarePath(s)).
Parameters
s
number
Returns
string
Example
import { squarePath } from "@sportsdataverse/sdvplot/bins";
squarePath(10); // "m-5,-5h10v10h-10z"