Change Scatterplot Shape

from Spotfire.Dxp.Application.Visuals  import ScatterPlot,MarkerShape,MarkerType,CategoryKey

vis = v.As[ScatterPlot]()

shape = Document.Properties["SHAPE"]
category = Document.Properties["CATEGO"]

markerType = getattr(MarkerType,shape)
vis.ShapeAxis.ShapeMap[category] = MarkerShape(markerType)

#list available shapes to copy and add data table from clipboard to populate shape dropdown:
shapes = [a for a in dir(MarkerType) if  not callable(getattr(MarkerType,a)) and not '__' in a ]
for x in shapes:print x

No comments: