Jump to content
We've recently updated our Privacy Statement, available here. ×

Python script, toggle specific vertical lines from data table on and off

Carson King

Recommended Posts

Hi, I have vertical lines on a bar chart referencing a data table and a specific column for the line positions.

Looking for a python script to toggle on and off specific vertical lines on the chart based on filtering in another column in the same data table

I have looked into this but I am stuck at this point

#I have the visualization parameter defined as vis, butpart this doesnt work in removing the vertical lines, (gives no error message in the output)

from Spotfire.Dxp.Application.Visuals import *

bc = vis.As[barChart]()

for fm in bc.FittingModels:

if fm.TypeId.DisplayName == "Vertical Line":


if fm.Line.DisplayName == "Completed Date":


#Once this works then I want to have a script that toggles on/off certain vertical lines based on valuesinanother column in the same data table

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