Ringga Ringga Posted December 5, 2018 Share Posted December 5, 2018 I have several visualization chart in one page. let's say I have 2 line charts, 1 bar chart and 1 combination chart. Currently it's limitted by MARKING_A. I'm curious if we can create python script to change the marking (let say MARKING_B) for all of the visualizations at the same time. Highly appreciate if someone can help on this issue. thanks. regards, Ringga Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted February 25, 2019 Share Posted February 25, 2019 Below is a sample script from Spotfire.Dxp.Application.Visuals import * #Access current active page page=Document.ActivePageReference # or to access a specific page #page=Document.Pages[1] # Specify the marking you want to set currentMarking = Document.Data.Markings['Marking_A'] newMarking=Document.Data.Markings['Marking_B'] for visual in page.Visuals: if visual.TypeId != VisualTypeIdentifiers.HtmlTextArea: vis=visual.As[VisualContent]() vis.Data.Filterings.Remove(currentMarking) vis.Data.Filterings.Add(newMarking) 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