Oct 31, 2014

Python script for Barchart label change percentage/value

from Spotfire.Dxp.Application.Visuals import BarChart
from Spotfire.Dxp.Application.Visuals import LabelInformationType
from Spotfire.Dxp.Application.Visuals import BarChartOrientation
from Spotfire.Dxp.Application.Visuals import StackMode

barChart=viz.As[BarChart]()
if dollor=="yes":
barChart.StackMode=StackMode.Stack
barChart.SegmentLabelInformationType=LabelInformationType.Value
else:
barChart.StackMode=StackMode.Stack100Percent
barChart.SegmentLabelInformationType=LabelInformationType.Percentage