I have a network chart chart built with d3 using Spotfire Mods. It has multiple properties defined in the mods manifest, as well as the data being passed from Spotfire to the mod.
My reader is defined as:
/** * Create the read function. */ const reader = mod.createReader( mod.visualization.data(), mod.windowSize(), mod.property("network_strength"), mod.property("display_labels"), mod.property("network_type"), mod.property("apply_color"), ); and my render function looks like:
/** * Initiate the read loop */ reader.subscribe(render); /** * @param {Spotfire.DataView} dataView * @param {Spotfire.Size} windowSize * @param {Spotfire.ModProperty<integer>} network_strength * @param {Spotfire.ModProperty<boolean>} display_labels * @param {Spotfire.ModProperty<string>} network_type * @param {Spotfire.ModProperty<string>} apply_color */ async function render(dataView, windowSize, network_strength, display_labels, network_type, apply_color) { However, if there are any changes in either the data, or any of the properties in the reader, the whole network needs to render again as there isn't a way to know what has changed, and whether the network needs rendered and simulated again.
Is there anyway to determine if the data, or a property has changed so I control what to update? For instance if someone changes only the display_labels, or apply_color property then I could just alter the settings of the existing network chart instead of having to redraw the network.
Thanks for any help!
https://stackoverflow.com/questions/66106061/in-spotfire-mods-is-it-possible-to-check-what-has-updated-or-changed-in-the-read February 09, 2021 at 01:05AM
没有评论:
发表评论