We know that if document property is referenced by a built-in visualization(e.g. bar chart), when the value of the document property changes, the visualization is rendered automatically to reflect the new value.
One of our customers wants this behavior for mod too.
They want to use the value of a document property in mod and trigger mod to redraw when the value of this document property changes.
var prop1=(await mod.document.properties()).find(x=>x.name=='prop1').value();
This is already possible to do.
API reference:
https://spotfiresoftware.github.io/spotfire-mods/overview/#AnalysisProperty
https://spotfiresoftware.github.io/spotfire-mods/api-docs/interfaces/SpotfireDocument.html#property
Example:
const reader = mod.createReader(mod.visualization.data(), mod.windowSize(), mod.document.property("myProperty"));
Thank you!