This sample illustrates how to limit the data in a visualization via Markings.Ensure to limit using Markings the tables from and the table onto which the limit needs to be applied are related via data relations
Introduction
This sample illustrates how to limit the data in a visualization via Markings.Ensure to limit using Markings the tables from and the table onto which the limit needs to be applied are related via data relations
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Data import * #vis is a script paramter referencing the visualization ,in this case a Table Plot which needs to be limited by markings vizData = vis.As[TablePlot]().Data newMarking = Document.Data.Markings["Marking"] vizData.MarkingReference = newMarking #Marking1 & Marking2 are coming from 2 different visualizations vizData.Filterings.Add(Document.Data.Markings["Marking1"]) vizData.Filterings.Add(Document.Data.Markings["Marking2"]) #For And'ing the markings #vizData.MarkingCombinationMethod = DataSelectionCombinationMethod.Intersection #For Or'ing the markings vizData.MarkingCombinationMethod = DataSelectionCombinationMethod.Union #To change the options for "If no items are marked in the master visualization, show:" option # To set "Message on empty background" vizData.LimitingMarkingsEmptyBehavior = LimitingMarkingsEmptyBehavior.ShowMessage vizData.LimitingMarkingsEmptyMessage = "Mark Something!" # To set "All data" vizData.LimitingMarkingsEmptyBehavior = LimitingMarkingsEmptyBehavior.ShowAll # To set "Empty Visualization" vizData.LimitingMarkingsEmptyBehavior = LimitingMarkingsEmptyBehavior.ShowEmpty
References
- API Reference:DataSelectionCombinationMethod
- API Reference:LimitingMarkingsEmptyBehavior
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.