Skip to content

Commit

Permalink
small
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzy committed Jun 19, 2023
1 parent b536ba4 commit e8c4277
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pages/circular-packing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CircularPackingDatasetTransitionDemo } from "../viz/CircularPackingData
import Link from "next/link";
import { LinkAsButton } from "component/LinkAsButton";
import { CircularPacking2LevelsDemo } from "viz/CircularPacking2Levels/CircularPacking2LevelsDemo";
import { ToDoSection } from "component/UI/ToDoSection";

const graphDescription = (
<>
Expand Down Expand Up @@ -208,7 +209,7 @@ export default function Home() {
<code>circle</code> or <code>text</code>
svg element, it is passed to an animated component that looks like this:
</p>
<CodeBlock code={snippet2} />
<CodeBlock code={snippetAnimation} />
<p>
This component uses the <code>useSpring</code> hook of react spring to
interpolate the <code>cx</code>, <code>cy</code> and <code>r</code>{" "}
Expand All @@ -234,6 +235,12 @@ export default function Home() {
<p>
<br /> <br />
</p>
<ToDoSection text="Zoom on next level of hierarchy" />
<ToDoSection text="Write label along circle with curve" />
<ToDoSection text="Better dataset transition where circle keep position" />
<p>
<br /> <br />
</p>
<div className="full-bleed border-t h-0 bg-gray-100 my-3" />
<ChartFamilySection chartFamily="partOfAWhole" />
<div className="mt-20" />
Expand Down Expand Up @@ -293,7 +300,7 @@ const packGenerator = d3.pack()
const root = packGenerator(hierarchy);
`.trim();

const snippet2 = `
const snippetAnimation = `
const AnimatedCircle = ({cx,cy,r,...props}) => {
const animatedProps = useSpring({
cx,
Expand Down

0 comments on commit e8c4277

Please sign in to comment.