Issue with "hide" on a graph element

If a label (on a graph or graph object) contains latex and starts hidden, then when it becomes visible, the latex is left unrendered with \(...\) around it. This doesn’t happen if the label starts visible, is hidden, then becomes visible again, or if conditional content can be used. Not sure if that’s a fixable problem or not, or if it’s fundamental to the difference between hide and conditional content precisely because hide means the label was always there.

But I haven’t had luck using conditional content with a label that’s on a graph object if the condition depends on the object’s position; I get a circular dependency error. I can work around it by using labels that are not actually children of the object and instead depend on the object’s position, but that seems less semantic.

I wouldn’t have run into this if the label had appeared masked over the axes. :slight_smile:

Can you give an example showing the bad behavior? I tried this DoenetML, and I couldn’t get it to break. When I uncheck “hide stuff”, the labels appear and are correctly rendered.

<booleanInput name="hide">
  <label>hide stuff</label>
  true
</booleanInput>

<graph>
  <point hide="$hide">
    <label>hi <m>x^2</m></label>
    (3,4)
  </point>

  <label anchor="(-3,4)" hide="$hide"><m>\int f(x)dx</m></label>
</graph>

I’m using it because I want the label to reveal later, but the point to be there from the beginning. So more like this:

<booleanInput name="hide">
  <label>hide stuff</label>
  true
</booleanInput>

<graph>
  <point>
    <label hide="$hide">hi <m>x^2</m></label>
    (3,4)
  </point>

  <label anchor="(-3,4)" hide="$hide"><m>\int f(x)dx</m></label>
</graph>

Got it. Now I can reproduce it for the label of the point. Created an issue to track this bug.