test

Warning when upgrading to Spotfire 10

TIBCO has deprecated the JQueryUI Javascript library in the latest Spotfire 10.0 release

TIBCO Community pages show us how to use JQuery properly

Change bar segment labels from percentage to value

# barChart is a BarChart Visualizaiton script parameter
# labelInformationType is an integer document property script parameter with values 0|1 for pct or value
from Spotfire.Dxp.Application.Visuals import BarChart
barChart.As[BarChart]().SegmentLabelInformationType = labelInformationType 


# if you need to toggle from percantage to value, you can do this too:
from Spotfire.Dxp.Application.Visuals import BarChart, BarChart,LabelInformationType
barChart = barChart.As[BarChart]()
barChart.SegmentLabelInformationType = LabelInformationType.Value if barChart.SegmentLabelInformationType==LabelInformationType.Percentage else LabelInformationType.Percentage

2 comments:

Aditya walia said...

Another way of doing this.

from Spotfire.Dxp.Application.Visuals import BarChart,LabelInformationType
barChart=barChart.As[BarChart]()
if barChart.SegmentLabelInformationType==LabelInformationType.Percentage:
barChart.SegmentLabelInformationType=LabelInformationType.Value
else:
barChart.SegmentLabelInformationType=LabelInformationType.Percentage

Jose Leviaguirre said...

Thanks Aditya for your suggestion. I added that option on the post.