Layering a Graph and Sketch

I can’t get the interactive parts of the graph to stay in place when I toggle it back to a Sketch in (Screen 4 of) this activity. I copied all the coding of the button, sketch, and graph from (screen 3 of) this activity where it does work. What am I missing/doing wrong?

Not sure why it’s resetting. I’m sure there’s a developer reason. However…

There aren’t a whole lot of components in your graph. You may want to redo your draggable points with sliders instead, and a list of those sliders. You can then copy the graph by exporting to the Desmos calculator and then copying the share link back into the sketch graph. Then, use the sketch CL to define all the sliders based on the graph.

For example, once you’ve define the point in the graph for the first 1, as:


Then in your sketch CL:

numberList(`X`): Graph.numberList(`X`)
numberList(`Y`): Graph.numberList(`Y`)

In your sketch’s graph, you’ll want to define sliders by the list: