未验证 提交 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 = ({
const rawDataset = rawData[i];
const infData: [Step, Value][] = [];
const nanData: [Step, Value][] = [];
let lastValidValue: Value = null;
rawDataset.forEach(([, x, y], j) => {
if (j > 0) {
if (dataset[j][2] != null) {
lastValidValue = dataset[j][2];
// FIXME: react async update...
if (rawDataset.length === dataset.length) {
let lastValidValue: Value = null;
rawDataset.forEach(([, x, y], j) => {
if (j > 0) {
if (dataset[j][2] != null) {
lastValidValue = dataset[j][2];
}
}
}
if (y === INF_VALUE) {
infData.push([x, lastValidValue]);
} else if (y === NAN_VALUE) {
nanData.push([x, lastValidValue]);
}
});
if (y === INF_VALUE) {
infData.push([x, lastValidValue]);
} else if (y === NAN_VALUE) {
nanData.push([x, lastValidValue]);
}
});
}
result.push({
data: infData,
symbolShow: false,
......
......@@ -13,4 +13,4 @@
# 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.
先完成此消息的编辑!
想要评论请 注册