简体   繁体   中英

HTML in Spotfire and IronPython

I want to make a drop down list in spotfire using html. So based on choice selected I want to show custom divs. How to implement that ?? Can anyone help with the ironpython script

Do you want to use ironpython or do you want to use 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. Drop down list - display div when clicking an option

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. You can create many options in your drop down list, and your Document.Properties will have the selected value of your drop down list.

Text Area could be designed in HTML/CC so you can customize as you want.

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)

I hope it will help you !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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