diff --git a/.changeset/nervous-owls-retire.md b/.changeset/nervous-owls-retire.md new file mode 100644 index 0000000000..11bc441783 --- /dev/null +++ b/.changeset/nervous-owls-retire.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/perseus": minor +--- + +Polygon interactive graphs use the legacy graph when numSides is set to unlimited diff --git a/packages/perseus/src/widgets/interactive-graph.tsx b/packages/perseus/src/widgets/interactive-graph.tsx index a4877678ff..00e6c9f8bb 100644 --- a/packages/perseus/src/widgets/interactive-graph.tsx +++ b/packages/perseus/src/widgets/interactive-graph.tsx @@ -1815,6 +1815,18 @@ class InteractiveGraph extends React.Component { } render() { + if ( + this.props.graph.type === "polygon" && + this.props.graph.numSides === "unlimited" + ) { + return ( + + ); + } + // Mafs shim if (this.props.apiOptions?.flags?.["mafs"]?.[this.props.graph.type]) { const box = getInteractiveBoxFromSizeClass(