Here is a sample python script to dynamically format the currency of the Value(Y) axis in a visualization
Introduction
Here is a sample python script to dynamically format the currency of the Value(Y) axis in a visualization
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Application.Visuals import BarChart from Spotfire.Dxp.Data import DataType from Spotfire.Dxp.Data.Formatters import * from System.Globalization import CultureInfo viz=barchart.As[BarChart]() numformattter = DataType.Real.CreateLocalizedFormatter() numformattter.Category = NumberFormatCategory.Currency numformattter.CultureInfo = CultureInfo("es-ES") numformattter.GroupSeparatorEnabled=True viz.YAxis.Scale.Formatting.RealFormatter = numformattter
References
- API Reference: Number Formatter
- Global CultureInfo List
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.