Getting details on demand button is quite straightforward in Spotfire, it comes as an inbuilt functionality. But what if you want to toggle it on and off, i.e. to show and hide by clicking on same button? That’s possible via Iron Python scripting.

Lets explore both the methods.

Getting Details on Demand window by using Spotfire functionality

Lets say you have a bar chart (or any viz) as below. You are supposed to have a button that on clicking, displays the details on demand at the bottom of the page.

Steps –

Insert a text area above. Right click – Edit HTML Click the ‘Insert Action Control’, 5th button from left in the toolbar. Give a display text, like – Details on Demand Let the Control type be ‘Button’ Under ‘Available Actions’, expand the ‘Functions’ tree by clicking on + sign (See image below). Under that, expand the ‘View’ tree by clicking on + sign again. Here you see ‘Details on Demand’. Select it, and click ‘Add’. Click ‘OK’, close the HTML window. You have your Details on Demand button as needed.

Select some data, and hit ‘Details on Demand’ button. The window will pop on right/bottom of screen and can be moved around as comfortable.

Toggling Details on Demand window by using Scripting

Steps –

Insert a text area above. Right click – Edit HTML Click the ‘Insert Action Control’, 5th button from left in the toolbar. Give a display text, like – Details on Demand Let the Control type be ‘Button’ Now click the ‘Script’ button on the left panel, and click ‘New’ from right. Give your script a descriptive name like Toggle- Details on Demand. Enter the script as shown in image. Click OK, click OK again, and close the HTML window. Script is given at the last. Now select some data and hit the button. Details on Demand panel appears. Hit it again and it disappears. You now have a toggle button for showing / hiding the Details on Demand panel.