Animating Data Changes in Tibco Spotfire

后端 未结 1 755
星月不相逢
星月不相逢 2021-01-21 22:58

This is my first post here, so please forgive me if I fail at etiquette somewhere along the way.

I am working on a POC dealing with animating a visualization within Tibc

1条回答
  •  鱼传尺愫
    2021-01-21 23:36

    this does not directly answer your question but provides you with a method of creating a timer that can interact with document properties. sorry that I don't have time to provide an explicit answer. as such feel free not to mark it accepted -- maybe someone else has a better one.

    the reason that your code doesn't work is because the IronPython engine locks Spotfire until execution is completed. you're not far off in assuming that the visualization doesn't update: in fact the entire application doesn't update! you can test this as I mentioned in my comment by setting the sleep value to 1 second.

    I created this DXP some time ago to illustrate how to allow IronPython and Javascript code to interact with each other inside of textareas. the IP->JS page should give you some clues on how to build your animation solution.

    what's going on behind the scenes here:

    1. a Spotfire Property Control (Input area) inside of a
      allows the user to enter text
    2. a Javascript function called update runs periodically: var timer = setInterval(update, 1000);
    3. the update function uses JQuery to access the input area via its parent
      : var text_in = $("#input_container").text();
    4. update finally replaces the text in an "output" container
      with the modified text: $("#output_container").html(rainbowize(text_in));

    you can modify this example to use JQuery to output to a document property-linked input area. in other words, use the Javascript timer setInterval() instead of time.sleep().

    I hope I've done a decent job of explaining that. let me know if it was unclear :)

    0 讨论(0)
提交回复
热议问题