4

I've created an interface, including mxgraph (javascript), that allows a user to click on a cell and edit the cell's label in a regular form text input that's separate from the graph. I'd like to change the cell's label after the user saves the form (ajax submit) without having to reload the graph.

I really don't need to do anything fancy with a cell/vertext label, but I do need to be able to change it's text. I don't need HTML labels if that's avoidable. And, I haven't found something like a "setLabel" method in the API.

Sounds like a simply thing. What am I missing?

Thanks

Gary C.
  • 41
  • 1
  • 3

1 Answers1

10

Set the value on the cell via the model:

graph.model.setValue(cell, value);
Frodo Baggins
  • 8,290
  • 6
  • 45
  • 55