Jump to content

How do I hide visualization in the dashboard page based on List box selection.


Shivaganga B

Recommended Posts

HI,

I have a tab in dashboard where 4 line charts are present. There are 4 options in the List box, created as a property control.When I am selecting 1st and 2nd options in list box, all the charts should be visible. When I select 3rd and 4th option only one line chart should be visible with diffrent X and Y axis values.

Is there any IPython script present for this

Link to comment
Share on other sites

There is no option to show/hide visualizations. One workaround would be to remove and add the visualizations as needed. Below is a sample reference for adding/removing a cross table

from Spotfire.Dxp.Application.Visuals import *

 

page=Document.ActivePageReference

vizExists=False

for visual in page.Visuals:

if visual.Title=="cTable":

vizExists=True

if vizExists:

page.Visuals.Remove(visual)

else:

visual=page.Visuals.AddNew(VisualTypeIdentifiers.CrossTable)

visualB=visual.As[CrossTablePlot]()

visualB.Title="cTable"

# add a script parameter table referring to the Data Table required

visualB.Data.DataTableReference=table

visualB.ColumnAxis.Expression=""

visualB.RowAxis.Expression=""

visualB.MeasureAxis.Expression="Sum([spent])"

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...