请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
工具/软件:Code Composer Studio
您好 E2E 团队、
我正在使用 ti_widget_plot 设计应用。 我可以定义小工具的大小、但该图不遵循这些大小。 下图显示了设计器中的图。 小工具的大小更大(请参阅框架)。
在运行时、我检查了检查专员中的 Aptribute:
即使我在下一次调用之后更改了检查器的宽度
Plotly.extendTraces (templateObj.$.ti_widget_plot.$.plot、update、[0、1、2、3]);
宽度设置回700px。
700px 的宽度 和400 sompx 的高度是否已硬编码? 还是可以覆盖的默认值?
以下是图绑定和更新的 js 实现:
templateObj.$.ti_widget_plot.data =[line0、line1、line2、line3];
templateObj.$.ti_widget_plot.layout ={
页边距:{
T:0
}
};
templateObj.$.ti_widget_plot.config =配置={
"linkText":"图形名称"、
"滚动缩放":正确、
'DisplayModeBar':正确、
"可编辑":true、
'宽度':"1000px"
};
templateObj.$.ti_widget_plot.reDraw ();
var cnt = 0;
var interval = setInterval (function(){
CNT++;
VAR 更新={
X:[[cnt]、[cnt]、[cnt]、[cnt]、
Y:[[document.getElementById ('ti_tile_meter_HV_I').value]、
[document.getElementById ("ti_tile_meter_HV_U").value]、
[document.getElementById ('ti_widget_gauge3').value]、
[document.getElementById ('ti_widget_gauge4').value]]
};
Plotly.extendTraces (templateObj.$.ti_widget_plot.$.plot、update、[0、1、2、3]);
},1000);
谢谢
Erik