简体   繁体   English

Spotfire 和 IronPython 中的 HTML

[英]HTML in Spotfire and IronPython

I want to make a drop down list in spotfire using html.我想使用html在spotfire中制作一个下拉列表。 So based on choice selected I want to show custom divs.因此,根据选择的选择,我想显示自定义 div。 How to implement that ??如何实施? Can anyone help with the ironpython script任何人都可以帮助使用 ironpython 脚本

Do you want to use ironpython or do you want to use HTML?你想使用ironpython还是想使用HTML? There is no need to use both although you could make a solution with both.尽管您可以同时使用两者来解决问题,但没有必要同时使用两者。

Anyway this question shows you how to do it with HTML and JavaScript, both of which I believe you can use in Spotfire.无论如何,这个问题向您展示了如何使用 HTML 和 JavaScript 来做到这一点,我相信您可以在 Spotfire 中使用这两种方法。 Drop down list - display div when clicking an option 下拉列表 - 单击选项时显示 div

You will want to create that script that is activated by your Property Control.您需要创建由您的属性控件激活的脚本。 The Property control would dynamically change a different textbox in the visualization.属性控件将动态更改可视化中的不同文本框。 The code you would use would look a bit like this:您将使用的代码看起来有点像这样:

from Spotfire.Dxp.Application.Visuals import HtmlTextArea

outputVis = output.As[HtmlTextArea]()

outputVis.HtmlContent = "<p>"

What you can do is add a new text area.您可以做的是添加一个新的文本区域。 Then, add a drop down list in this text area.然后,在此文本区域中添加一个下拉列表。 You can create a new Document.Properties linked to this drop down list.您可以创建一个链接到此下拉列表的新Document.Properties You can create many options in your drop down list, and your Document.Properties will have the selected value of your drop down list.您可以在下拉列表中创建许多选项,并且您的Document.Properties将具有下拉列表的选定值。

Text Area could be designed in HTML/CC so you can customize as you want.文本区域可以用 HTML/CC 设计,因此您可以根据需要进行自定义。

Once you have your Document.Properties with the drop down list value, you can go on your chart properties and add a custom expression with your Document.Properties like [MyCol]==$(docproperties)获得带有下拉列表值的Document.Properties ,您可以继续使用图表属性并使用Document.Properties添加自定义表达式,例如[MyCol]==$(docproperties)

I hope it will help you !我希望它会帮助你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM