Jump to content

ZoomSlider Programatically Find out How Many Nodes Available


Andrew H

Recommended Posts

Hi there Spotfire experts!

I'm trying to figure out if there is a way to programatically return the number of nodes available on a zoom slider for a given visualization. Here's what I have so far:

########################################

from Spotfire.Dxp.Application.Visuals import *

visual_A = viz.As[VisualContent]() #viz is a script parameter referencing a specific visualization

print visual_A.XAxis.Range.High #prints "none"

#######################################

I have a visualization where the x-axis is a date value. What I want to show is the latest "m" number of months available for this visualization by default. But I would still like for the end-user to have the ability to scroll backwards to earlier dates if available .

So what I'm thinking here is to reference the max (or highest) node number for the X-axis ZoomSlider. This would provide the upperbound for the ZoomSlider "AxisRange". Then, by default I want to customize the "Range.Low" value to be the max node number minus "m" months or (Max_Node_Number - m). This would set a particular date range for the visualization. And then if the user wants to see earlier data they can then scroll using the Zoom Slider.

Would anyone know how to achieve this I would like to use the ZoomSlider for this if possible.

Thanks in advance!

Link to comment
Share on other sites

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...