1

I need to change the column used on the x-Axis on a bar chart. how can I do this in IronPython?

Keng
  • 52,011
  • 32
  • 81
  • 111

2 Answers2

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
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