JSX Graph self-reference

18 views
Skip to first unread message

Fern Gossow

unread,
Jul 26, 2026, 11:15:06 PM (8 days ago) Jul 26
to Numbas Users
Hi everyone,

TL;DR: When creating multiple objects in a single JSXGraph, how can we initialise some objects before others so that their values can be accesed?

Currently creating a simple JSXGraph applet within a Numbas question. This involves a slider and a textbox which shows a conversion between cm and in.
demo.png
My problem is with getting the text box to automatically update when the slider is moved. As far as I know, the intended way to make these diagrams is through a single jsxgraph( ) call in the Variables section of the Numbas question.

How do I get the text object to automatically pull the value from the slider object? With only one call, the slider object is not initialised before the text object. Placing these into a let( ) statement and using sequential jsx_add_objects( ) calls also introduces an explicit self-reference error. I'm sure I'm missing something simple here!

Thanks,
Fern Gossow
UNSW
Reply all
Reply to author
Forward
0 new messages