Shivaganga B Posted October 9, 2019 Share Posted October 9, 2019 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 More sharing options...
Shandilya Peddi Posted October 9, 2019 Share Posted October 9, 2019 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 More sharing options...
Shivaganga B Posted October 10, 2019 Author Share Posted October 10, 2019 visualB.Data.DataTableReference=table part is throwing error. I gave as visualB.Data.DataTableReference=Daily Transaction Details. I tried quotation marks, its showing error like -TypeError: expected DataTable, got str Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted October 10, 2019 Share Posted October 10, 2019 here "table" is a script parameter added which refers to the data table. You can either add a script parameter or use the below snippet visualB.Data.DataTableReference=Document.Data.Tables["Daily Transaction Details"] Link to comment Share on other sites More sharing options...
Shivaganga B Posted October 11, 2019 Author Share Posted October 11, 2019 Thank you. Its working. Link to comment Share on other sites More sharing options...
Shivaganga B Posted November 4, 2019 Author Share Posted November 4, 2019 HI, If I remove and create line charts once again, then Layout is changing. Text area is moving from top to bottom. Is there any way to keep the text area fixed position Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now