>我有下面的代码,它从文本区域中获取一个字符串并将其添加到 Spotfire 可视化的极限数据表达式中。 但是,当我尝试针对JS可视化运行代码时,出现以下错误:
属性错误:"NoneType"对象没有属性"Data">
在 Spotfire(本机(可视化上运行相同的代码时,它工作正常,没有问题。我需要在代码中更改什么才能为js可视化提供相当于limit data by expression
框?
from Spotfire.Dxp.Application.Visuals import *
from Spotfire.Dxp.Data import *
for vis in Document.ActivePageReference.Visuals:
if vis.Title == 'Chart wizard area':
ta= vis.As[HtmlTextArea]().HtmlContent
print ta
for vis1 in Application.Document.ActivePageReference.Visuals:
if vis1.Title == 'chart viz': #if statement for testing
print 'hello'
visual = vis.As[Visualization]()
visual.Data.WhereClauseExpression = ta
这是不可能的
使用IronPython,您只能编辑Spotfire对象。Js viz 是一个 JavaScript 对象,因此无法从 IronPython 访问。