# My graph resets when I don't want it to

**URL:** <https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270>\
**Category:** Questions\
**Created:** [August 1, 2020, 12:18am UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270 "2020-08-01T00:18:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [August 1, 2020, 12:18am UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/1 "2020-08-01T00:18:23Z")

</div>

Hello Forum Friends,

I created a screen that allows students to resize the graph axes, graph points, and add line/curve of best fit. But, as soon as the student goes to the second table in the screen to type their extrapolated data answer from the graph, the graph resets immediately. I cannot find my error. I am including the activity. Thanks for the help.

[https://teacher.desmos.com/activitybuilder/custom/5f249148db7bde1bb29ac689](https://teacher.desmos.com/activitybuilder/custom/5f249148db7bde1bb29ac689)

Richard Punches

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [August 1, 2020, 4:38am UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/2 "2020-08-01T04:38:17Z")

</div>

I think it’s because when the table is entered it might reset all the buttons on the screen (this might be a bug).

One way you could test this is to put the code  
resetLabel: “reset”  
into the buttons. Then after you click on them, it will display the text ‘reset’, and according to my theory, when you click in the table, they will go back to buttons.

Setting aside whether this is a bug or not, it’s annoying, but can I suggest a different interface?

I think checkboxes work well for this type of thing so you can have a checkbox for “Show line of best fit” and another for “Show curve of best fit”. They also have the advantage of not randomly resetting!

---

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [August 1, 2020, 5:15am UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/3 "2020-08-01T05:15:41Z")

</div>

Bryn, thanks for the reply. Hmmm, checkboxes. I hadn’t thought of that. I’m still new to this game. I’ll mess around with it.

My thought is the reason it is resetting is that as soon as I click in the second text box, the timer resets to zero and that resets everything that was running in the animation showing the graph scale changing with timeSincePress. I was able on a different page to make the value that controls changing the graph static and that stopped the problem, but it also stopped the cool animation effect that can stick in a kid’s head when they start to think how their axes will change. I think there could be a use for lastValue and capture here, but I am still really weak with CL. For example, capture the axes scale settings from the table as the students put the value in. Then, the system animates out to the new values and they become the new defaults. But, I can’t figure it out. This stuff keeps me up until 3:00 AM nightly. Ugh.

Richard

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [August 1, 2020, 9:09am UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/4 "2020-08-01T09:09:12Z")

</div>

Yep - that is frustrating. By the way, I think your activity is now marked as private so others probably won’t be able to help you easily either.

One suggestion is that if John Rowe or Jay Chow still have their 30-minute one-on-one CL bookings, I think they could definitely talk you through what you’re trying to achieve here.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 1, 2020, 5:40pm UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/5 "2020-08-01T17:40:10Z")

</div>

Your activity is currently private, but not sure if you’re aware also that timeSincePress will reset after a certain time frame. I think default is 10 seconds, but you can extend it by entering a number. `timeSincePress(100)` changes it to 100 seconds. I don’t know the upper limit.

---

<div class="post-metadata">

**Author:** ![Richard\_Punches](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/richard_punches/32/882_2.png) [@Richard\_Punches](https://cl.desmos.com/u/Richard_Punches)\
**Post date:** [August 1, 2020, 7:04pm UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/6 "2020-08-01T19:04:29Z")

</div>

Here is a link that is not private. The timeSincePress(2.4) is specific to the animation. I thnk there is something in the capture sink, but I don’t know how to do it.

[https://teacher.desmos.com/activitybuilder/custom/5f25ba00c4ff077925a8ab88](https://teacher.desmos.com/activitybuilder/custom/5f25ba00c4ff077925a8ab88)

Thanks again.

---

<div class="post-metadata">

**Author:** ![Jeff\_Holcomb](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_holcomb/32/433_2.png) [@Jeff\_Holcomb](https://cl.desmos.com/u/Jeff_Holcomb)\
**Post date:** [February 26, 2022, 5:15pm UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/7 "2022-02-26T17:15:53Z")

</div>

I’m wondering if anyone figured this out somewhere else. I also need to NOT have the graph reset when I enter a second table on the screen after a timer has run to show an animation.

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [February 26, 2022, 8:14pm UTC](https://cl.desmos.com/t/my-graph-resets-when-i-dont-want-it-to/1270/8 "2022-02-26T20:14:12Z")

</div>

With the introduction of Actions and the ticker, this is a bit more doable now as you can have the ‘timer’ in the graph incrementing using the ticker rather than using `.timeSincePress`

If you share with us the activity you’re working on, we might be able to offer more advice on how to get it to work specifically for yours.
