我正在使用以下px-vis-timeseries图形配置,并根据资产选择显示图形。
<px-card header-text="Rotor - Lifetime Remaining ">
<div style='height: 350px;'>
<px-vis-timeseries
width="1000"
height="250"
margin='{"top":30,"bottom":60,"left":65,"right":65}'
register-config='{"type":"vertical","width":200}'
selection-type="xy"
chart-data="{{ltuchartData}}"
series-config="[[LTUseriesConfig]]"
chart-extents="[[_chartExtents]]"
prevent-web-worker-synchronization="true"
event-config='{}'
threshold-data='[
{"for": "y0","type": "max", "value": 50},
{"for": "y0","type": "min","value": 25}]'
threshold-config='{
"max": {"color": "orange","dashPattern": "5,0","title": "LIFE TIME ASSESSMENT",
"showThresholdBox": true,"displayTitle": true},
"min": {"color": "red","dashPattern": "5,0", "title": "INCREASED RISK OF FAILURE",
"showThresholdBox": true,"displayTitle": true}}'
x-axis-config='{"title":"Time"}'
y-axis-config='{"axis1":{"title":"Remaining","titleTruncation":false,"unit":"%"}}'
hide-gridlines-x="true"
hide-gridlines-y="true"
disable-navigator="true"
toolbar-config="{{ToolbarConfig}}">
</px-vis-timeseries>
</div>
</px-card>
我的问题是,当我第一次从上下文浏览器中选择资产时,此时没有正确获取图形视图作为附加快照,那么我需要调整浏览器窗口的大小,然后才能正确获取图形视图,并且如果我给属性prevent-resize =如果在px-vis-timeseries配置中为true,则每次都能正确获取图形,但是在这种情况下,我的图形没有响应,我们也需要响应图,因此我无法使用prevent-resize来解决此问题。