I need to change the column used on the x-Axis on a bar chart. how can I do this in IronPython?
Asked
Active
Viewed 1,165 times
2 Answers
1
change what on the x axis?
#change the Range from 0 to 100:
from Spotfire.Dxp.Application.Visuals import VisualContent, AxisRange
viz= viz1.As[VisualContent]()
viz.XAxis.Range = AxisRange(0,100);
For more attributes, see the API

jleviaguirre
- 686
- 6
- 10
-
oops, forgot to leave a comment when I clarified the question. – Keng Dec 11 '15 at 14:21
1
Here's how I do it.
from Spotfire.Dxp.Application.Visuals import VisualContent
#"visual" is the name of the parameter found in the "Script Parameter" dialog below the editor which points to the visualization I want to change.
vc = visual.As[VisualContent]()
exp="["+Document.Properties["DocPropertyNameHere"]+"]"
vc.YAxis.Expression =exp

Keng
- 52,011
- 32
- 81
- 111