如何使用IronPython在Spotfire中的条形图上设置x轴(x轴)?

时间:2015-12-10 14:50:31

标签: ironpython spotfire

我需要在条形图上更改x轴上使用的列。 我怎么能在IronPython中做到这一点?

2 个答案:

答案 0 :(得分:0)

改变x轴上的内容?

#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);

有关更多属性,请参阅API

答案 1 :(得分:0)

我是这样做的。

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