Chinta Chandana Posted July 26, 2021 Share Posted July 26, 2021 i havee create 3 visuals in different page1.scatterplot,2.linechart.3.bargraph i have tried code from Spotfire.Dxp.Application.Visuals import * #1 Loops through visuals for visuals in Activepage.Visuals: #1.1 check each visual type if vis.TypeId==VisualTypeIdentifiers.BarChart: if vis.TypeId==VisualTypeIdentifiers.LineChart: #1.2 Reset zoom sliders vis.As[VisualContent]().XAxis.ZoomRange=AxisRange.DefaultRange vis.As[VisualContent]().YAxis.ZoomRange=AxisRange.DefaultRange this is not working Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 27, 2021 Share Posted July 27, 2021 Please check this link: https://community.spotfire.com/wiki/how-reset-x-axis-zoom-slider-tibco-spot... You can do this for mutliple visualizations as well. Here, vc1 can be on page Xand vc2 can be on page Y: from Spotfire.Dxp.Application.Visuals import ScatterPlot vc = vc1.As[scatterPlot]() #Following 4 lines will reset the zoom slider vc.XAxis.ManualZoom = False vc.XAxis.ManualZoom = True vc.YAxis.ManualZoom = False vc.YAxis.ManualZoom = True ################################################ vc = vc2.As[scatterPlot]() #Following 4 lines will reset the zoom slider vc.XAxis.ManualZoom = False vc.XAxis.ManualZoom = True vc.YAxis.ManualZoom = False vc.YAxis.ManualZoom = True ################################################ Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 27, 2021 Share Posted July 27, 2021 I think there is an issue with your if clauses. If it is a bar chart, it can't be a line chart. This statement should be connected with OR. Or you check the case one after each other. Can you try this from Spotfire.Dxp.Application.Visuals import * #1 Loops through visuals for visuals in Activepage.Visuals: #1.1 check each visual type if vis.TypeId==VisualTypeIdentifiers.BarChart: vis.As[VisualContent]().XAxis.ZoomRange=AxisRange.DefaultRange vis.As[VisualContent]().YAxis.ZoomRange=AxisRange.DefaultRange if vis.TypeId==VisualTypeIdentifiers.LineChart: vis.As[VisualContent]().XAxis.ZoomRange=AxisRange.DefaultRange vis.As[VisualContent]().YAxis.ZoomRange=AxisRange.DefaultRange 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