Repository navigation
test: lock boxPlot outliers after updateDataSync from empty data - #4695
Conversation
…ataSync Register array-min/array-max for outliersField even when empty initial data omits that key, so updateDataSync can render outlier points. Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
Add the issue-shaped VChart render cases and keep the node-runner unit coverage for empty-init updateData plus foldOutlierData. Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
xile611
left a comment
There was a problem hiding this comment.
@dyk1454683243-sudo 已完成 review,目前建议先补充真实回归证据,再以修复 #4270 合并。
对比基线 c4191139a340f18f0e32dcb353c51009d88a6205 和本 PR 的 5227b8caababa2f6ef1f8d224bceb053ad27a159,直接使用 #4270 的 spec(初始 data: [{ id: 'boxPlot' }],renderSync 后 updateDataSync),浏览器中两者都能正确显示三个离群点,离群值统计均为 min=12.01、max=14.03,轴域均为 [0, 15]。因此当前基线已无法复现 issue,尚未证明本次统计字段兜底是必要修复。
验证情况:
- 本地补充的真实 VChart 场景:纵向、横向、清空后再次填充,基线和 PR 均通过。
- 合并运行上述用例和 PR 新增测试,PR 为 11 passed / 2 skipped(node 环境跳过两个 DOM 渲染用例,另做了实际浏览器验证);仅撤回生产代码改动后为 9 passed / 2 failed / 2 skipped。失败的两个用例分别手动移除了内部字段和清空 axis helpers,不能证明 issue 的公共 API 路径存在该问题。
- 修改文件的 ESLint、Prettier 检查通过;未发现新增渲染回归。
请补充一个通过有效 spec / 公共 API 能在基线失败、在本 PR 通过的回归用例,并据此定位根因。如果找不到该场景,建议移除缺乏复现依据的生产代码兜底,保留有效的回归测试,并调整 PR 的修复声明。具体测试问题见行内意见。
VisActor#4270's public spec already renders outliers on develop. The chart transformer places outliersField on the value axis, and viewDataUpdate refreshes the folded marks. Pushing a statistic when that field is absent does not change the axis domain or outlier graphics. Remove that fallback and the tests that stripped _fieldY or axis helpers. Keep VChart regressions for empty-init updateDataSync, outliers outside the box range, horizontal layout, and clear-then-refill. Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
|
@xile611 Thanks for the review. You were right: the statistic fallback wasn't needed, since develop already includes |
Regression lock for #4270 (not a production fix).
Investigation showed develop already handles this:
BoxPlotChartSpecTransformeraddsoutliersFieldto the value-axis fields even with empty initial data, so the domain covers outliers andviewDataUpdate()refreshes the outlier marks. The earlier statistic fallback was unnecessary and has been removed;getStatisticFields()matches develop.This PR now only adds tests via the public API (
new VChart(spec)+updateDataSync) covering vertical/horizontal layouts, out-of-box outliers, and clear-then-refill. Change file type: none.