Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Hidden visualization properties

Sometimes latest API is not published or some functionality is not exposed. 

script

from Spotfire.Dxp.Application.Visuals.Maps import MapChart
#map is a script parameter pointing to your map
m = map.As[MapChart]()

import inspect
for i in inspect.getmembers(m):
    # Ignores anything starting with underscore 
    # (that is, private and protected attributes)
    if not i[0].startswith('_'):
        # Ignores methods
        if not inspect.ismethod(i[1]):
            print(i)


output

('AddAutoTitleTrigger', )
('ApplyColumnNamesOnAxis', )
:
('SerializeReadOnlyProperty', )
('ShowDescription', False)
('ShowInteractionMode', True)
('ShowLayerHandler', True)
('ShowNavigationControls', True)
('ShowScale', True)
('ShowSearchField', True)
('SupportsChangeDataTableByCheckingAxesAndExpressionColumns', )
('SupportsTransparency', True)
('SupportsTryChangeDataTable', )
('Title', 'Map chart')
('Transactions', )
('Transform', )
('Transparency', 0.0)
('Trellis', )
('TrellisLayerReference', )
('TryGetFilterRules', )
('TypeId', )
('UseSeparateColorForMarkedItems', False)
('ValidateAttached', )
('ViewExtent', )
('Visual', )

use case

from Spotfire.Dxp.Application.Visuals.Maps import MapChart
#map is a script parameter pointing to your map
m = map.As[MapChart]()

m.ShowLayerHandler= not m.ShowLayerHandler
m.ShowDescription= not m.ShowDescription
m.ShowSearchField= not m.ShowSearchField
m.ShowScale= not m.ShowScale
m.ShowInteractionMode= not m.ShowInteractionMode
m.ShowNavigationControls = not m.ShowNavigationControls #hide
m.ShowNavigationControls = True #show

No comments: