未验证 提交 aa1bd8e6 编写于 作者: P Peter Pan 提交者: GitHub

fix: error when data length changed in scalar page (#1037)

* chore: fix typo

* chore: update dependencies

* fix: error when same tags in one chart in scalar page

* fix: error when data length changed in scalar page
上级 5ddd49a5
...@@ -153,19 +153,22 @@ export const chartData = ({ ...@@ -153,19 +153,22 @@ export const chartData = ({
const rawDataset = rawData[i]; const rawDataset = rawData[i];
const infData: [Step, Value][] = []; const infData: [Step, Value][] = [];
const nanData: [Step, Value][] = []; const nanData: [Step, Value][] = [];
let lastValidValue: Value = null; // FIXME: react async update...
rawDataset.forEach(([, x, y], j) => { if (rawDataset.length === dataset.length) {
if (j > 0) { let lastValidValue: Value = null;
if (dataset[j][2] != null) { rawDataset.forEach(([, x, y], j) => {
lastValidValue = dataset[j][2]; if (j > 0) {
if (dataset[j][2] != null) {
lastValidValue = dataset[j][2];
}
} }
} if (y === INF_VALUE) {
if (y === INF_VALUE) { infData.push([x, lastValidValue]);
infData.push([x, lastValidValue]); } else if (y === NAN_VALUE) {
} else if (y === NAN_VALUE) { nanData.push([x, lastValidValue]);
nanData.push([x, lastValidValue]); }
} });
}); }
result.push({ result.push({
data: infData, data: infData,
symbolShow: false, symbolShow: false,
......
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
# limitations under the License. # limitations under the License.
# ======================================================================= # =======================================================================
vdl_version = '2.2.1' vdl_version = '2.2.3'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册