What question type do you use? Ich would recommend to use Formulas. Then you can use our JSXGraph Moodle formulas extension. It is included in the JSXGraph Moodle filter (no files have to be installed additionally). You can find a documentation here: https://github.com/jsxgraph/moodleformulas_jsxgraph/blob/master/README.md.
In your case you can type:
<jsxgraph width="600" height="500" ext_formulas>
// JavaScript code to create the construction.
var jsxCode = function (question) {
var brd = JXG.JSXGraph.initBoard(BOARDID, {boundingbox:[-5,5,5,-5], axis:true});
var p = brd.create('point', [0,1]);
if (question.isSolved)
p.moveTo([0,2]);
};
// Execute the JavaScript code.
new JSXQuestion(BOARDID, jsxCode, /* if you want to see inputs: */ true);
</jsxgraph>
This code would move the point to [0,2] when the question is displayed after submission.
I hope, I could help you.