Stop the Simulation
Closed this issue · 5 comments
Gykonik commented
Is there a way to stop the simulation using forceDirectedGraph
? :)
sgratzl commented
the controller has a stopLayout
method
Gykonik commented
How do I access the controller? I tried using Chart.registry.getController("forceDirectedGraph");
, which gives me some sort of controller - but there I cannot call stopLayout()
sgratzl commented
can you try chart.getSortedVisibleDatasetMetas()[0].controller.stopLayout()
Gykonik commented
Thanks for the answer. However, that gives me the following type error TS2339: Property 'stopLayout' does not exist on type 'DatasetController , Element , number | ... 7 more ... | (ITreeNode & { ...; })>'
and thus doesn't seem to work.
sgratzl commented
try
chart.getDatasetMeta(0).controller.stopLayout();