- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
大家早上好,
我已经在这个问题上工作了几天,但我找不到解决办法。我已经研究并谷歌搜索无济于事。任何帮助/见解将不胜感激。我正在尝试创建一个按钮,单击该按钮时将自动通过日期过滤器(比如说从 1/1/15 开始)并通过 1/2 -1/5 更新带有新过滤的标记层的 map ,因为它逐步通过功能。我已经让过滤器逐步通过 1/1-1/5;但是,它不会随着 map 的进展而更新 map 可视化,因此用户看到的只是从 1/1 跳转到 1/5,中间有一个暂停(我每一步都有一个 sleep 计时器)。我已经包含了下面的代码,我只是在学习 IronPython,我不确定我需要调用什么来刷新可视化。 Visualization.Refresh() 不起作用。非常感谢!
import Spotfire.Dxp.Application.Filters as filters
import Spotfire.Dxp.Application.Filters.ItemFilter
import time
from Spotfire.Dxp.Application.Filters import FilterTypeIdentifiers
from Spotfire.Dxp.Data import DataProperty, DataType, DataPropertyAttributes, DataPropertyClass
from Spotfire.Dxp.Application.Visuals import MarkerLayer
myPanel = Document.ActivePageReference.FilterPanel
myFilter= myPanel.TableGroups[2].GetFilter("Date (Daily)")
myFilter.FilterReference.TypeId = FilterTypeIdentifiers.ItemFilter
itemFilter = myFilter.FilterReference.As[filters.ItemFilter]()
whichCol = itemFilter.DataColumnReference
count = 0
while count < 5:
count = count +1
if (whichCol.Properties.PropertyExists("CurrentStep") == False):
myProp = DataProperty.CreateCustomPrototype("CurrentStep",0,DataType.Integer,DataPropertyAttributes.IsVisible|DataPropertyAttributes.IsEditable)
Document.Data.Properties.AddProperty(DataPropertyClass.Column, myProp)
whichCol.Properties.SetProperty("CurrentStep",0)
Document.Properties["DateTest"] = "1/1/15"
time.sleep(1)
else:
time.sleep(1)
whichVal = whichCol.Properties.GetProperty("CurrentStep")
#print whichVal
#print itemFilter.Values.Count
if (whichVal == itemFilter.Values.Count):
whichCol.Properties.SetProperty("CurrentStep",0)
Document.Properties["DateTest"] = "1/1/15"
else:
itemFilter.Value = itemFilter.Values.Item[whichVal]
whichCol.Properties.SetProperty("CurrentStep",whichVal+1)
Document.Properties["DateTest"] = itemFilter.Value
最佳答案
根据我的理解,这不能使用 IronPython 来完成。引用 niko 对我的类似问题的回答:Animating Data Changes in Tibco Spotfire
“IronPython 引擎会锁定 Spotfire,直到执行完成。”
因此,我以与尝试为散点图制作动画的尝试相同的方式解决了您的问题……使用 JS 而不是 IP。由于我无权访问您正在使用的数据集,因此我使用了一个随机数据集,该数据集的 id 列从 1 到 100 而不是日期。我设置了一个数据限制自定义表达式 [id]=${FilterValue},其中 {FilterValue} 是一个文档属性,整数类型设置为默认值 1。然后我使用以下 HTML 和 JS 从 1 迭代该属性- 100。注意:我在 SF 7.0 中使用“dark”视觉主题进行了此操作。在“light”主题中,或者在 SF 6.X 中,您需要为 HTML 和 JS 中的按钮定义不同的颜色。根据要求,我可以将 .dxp 上传到 dropbox 并在此处共享。我希望这有帮助。
HTML:
<div id="button1" style="padding: 2px; border: 3px outset grey; border-image: none; text-decoration: none; cursor:pointer; -webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;position:relative;
user-select: none;width:13em;display:block;;"><font color="white" size="2" style="margin:0px 0px 0px 1px">Cycle Filters</font>
</div>
<div id='FilterValue' style='display:none'>
<SpotfireControl id="b986fa43508a484da22f6b42d510061f" />
</div>
var button=document.getElementById(button1);
var doc=document.getElementById(doc);
t=0;
var CycleFilters = function(){
if (t<=100)
{
$("#FilterValue input").val(t).blur();
t+=1;
}
}
var mouseDown=function()
{
button.style.background="#202020";
button.style.border="3px inset grey";
button.style.padding="4px 0px 0px 4px";
button.onmouseup=mouseUp;
button.onmouseout=mouseOut;
button.onmouseover=mouseOver;
}
function mouseUp() {
button.style.background="none";
button.style.border="3px outset grey";
button.style.padding="2px 2px 2px 2px";
button.onmouseover=mouseOver2;
t=0.00;
setInterval(CycleFilters,1000)
//document.getElementById('mySpotfireControlx').firstChild.value = 20;
//$("#mySpotfireControlx input").val(20).blur();
//document.getElementById('mySpotfireControly').firstChild.value = 10;
//$("#mySpotfireControly input").val(10).blur();
}
function mouseOut()
{
button.style.background="none";
button.style.border="3px outset grey";
button.style.padding="2px 2px 2px 2px";
}
function mouseOver()
{
button.style.background="#202020";
button.style.border="3px inset grey";
button.style.padding="4px 0px 0px 4px";
}
function mouseOver2()
{
button.onmousedown=mouseDown;
}
button.onmouseover=mouseOver2;
button.onmouseout=mouseOut;
document.documentElement.addEventListener('mouseup', function(e)
{
button.onmouseover=mouseOver2;
})
关于ironpython - Spotfire IronPython 脚本滚动过滤器并每一步更新可视化(通过日期范围播放按钮),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29123962/
我有一个报告,一旦用户单击“保存”按钮,它就会触发一个脚本。我可以做一个对话框,一旦用户单击“保存”,就会弹出一个带有“确认保存...是吗?否?”的对话框,当用户单击"is"时它会触发脚本?我希望这可
在 Spotfire 中,我尝试从与我的绘图不同的数据表中的列绘制三条水平曲线。这些线应该是目标线。我知道我可以在组合图表或属性中的线条和曲线中执行此操作。 但是,我不喜欢在组合图表中执行此操作,因为
当我在“Cell Values”中使用 FIRST(CG1) 时,总计不是汇总,而是显示 FIRST(CG1) 的结果中的一个值>. 请告知我们是否必须始终使用 sum(XXX) 来求和。 最佳答案
我正在尝试为 Spotfire 中的特定数据列引用另一行中的值。例如,我想引用销售月份,其中青铜小部件的销售量等于黄金小部件的数量。我在下面添加了一列来显示我需要的数据,“铜牌销售额 = 黄金销售额的
在我们的 Web 应用程序中,我们使用“TIBCO Spotfire JavascriptAPI”集成 Spotfire 报告 我们需要显示来自多个 Spotfire 服务器的报告。例如,我们在“sp
如何通过Web服务调用spotfire,并使用Java获取pdf报告。 该报告已在 Spotfire 中设置。即,如果人们使用 Spotfire-UI,则可以查看报告。他们可以使用该 UI 手动将其导
我可以在 Spotfire 中使用日历过滤器吗?我知道范围过滤器,但我希望用户只能从表格中的一系列日期中选择一个日期。 最佳答案 它有点高级,需要一些脚本(虽然提供了代码),但可以使用日期选择器: h
我在石油和天然气行业工作,正在寻求有关如何计算一组井之间的最小距离的建议(这些井在 map 上绘制为直线)。我的目标是让每个井都有一个独特的“间距”值(以英尺为单位),这基本上是 map 上到最近井眼
如何从 Spotfire 中的字符串中提取数字... 示例: 输入列:ACD:1234F 输出列:1234 非常感谢您的帮助 最佳答案 请查看您发布的这些问题,如果您认为答案正确,请接受答案。我确信他
我试图将字符串拉到下面字符串中最后一个正斜杠的右侧。 /Applied Analytics/URMFG/Service Analysis/ServiceAnalysis 基本上,我希望看到 Servi
假设我有一个可视化,它由面板按一些分类变量网格化,每页一个面板。我想遍历面板并将每个图像导出到一个文件,文件名与分类变量匹配。 按照一些已发布的示例,图像导出工作完全正常。但是,我在实际获取当前面板的
我正在创建一些 Spotfire 文件,在这些文件中我使用 IronPython 脚本能够根据用户需求从文本文件中导出和导入值。但是,当我将 Spotfire 重新定位到其他人时,脚本无法执行。 当转
我有一个下拉列表(用于过滤表格)。 目前我有这个下拉列表,其中包含来自数据表列的唯一值。我不知道如何只拥有未过滤的值。 小例子: // Table from which unique not-filt
有没有办法在需要时添加一个按钮来加载数据。我知道按需加载数据选项,这没有帮助,因为我有超过 1000 万的数据行,而且在 Spotfire 中加载它仍然需要时间。我需要一个选项,当我单击按钮开始时,可
有没有办法在 spotfire 交叉表中做到这一点?当前格式的列标题将是我在垂直轴上的数据,而水平轴将是日期格式。我无法从网上找到任何格式与我下面的示例类似的示例。 示例格式如下: BR, 合资企业
您好,我正在创建一个 spotfire 仪表板,我希望每年都可以重复使用它。 目前,我的布局设计为一个包含 8 个包含商店名称的按钮的页面,如果单击,spotfire 会应用过滤器,以便仅显示与该商店
我在名为“关键事件”的列的文本区域中有一个复选框过滤器。我有一个操作控制按钮,我需要能够计算此过滤器中选中了多少个框。 我似乎无法正确引用此过滤器并计算选中了多少个框。 谢谢! 最佳答案 下面是一个i
我完全不确定我所需要的东西是否可以通过我拥有的工具实现,但我想我会问。 我有以下 Python 脚本(技术上是 IronPython,但我不完全理解其中的区别),我从博客中提取了该脚本并根据我的目的进
我在 Spotfire 中有一个列表框,里面有国家。列表框包括(无)作为选择选项。当在列表框中选择一个国家时,该国家的名称和一个星形图标会出现在另一个测试面板中。之后,如果选择了(无),国家的名字就会
使用 Spotfire (v7.8.1) 时,如何在交叉表的列值上显示自定义工具提示? 虽然有一个选项可以自定义饼图的工具提示,但我找不到用于交叉表可视化的选项。是否有可以编辑工具提示文本的自定义表达
我是一名优秀的程序员,十分优秀!