Skip to content

QuiverPlot & RangeSlider: numeric attributeTypeRules reference a non-existent "value" field #6795

Description

@kz930

What happened?

Both QuiverPlotOpDesc and RangeSliderOpDesc carry a class-level @JsonSchemaInject attributeTypeRules block that constrains a field named value to numeric types — but neither operator has a value field, so the rule matches nothing and no type constraint is applied. The frontend column pickers therefore allow columns of any type for fields the operator can only handle as numeric, which fails at runtime.

QuiverPlotcommon/.../visualization/quiverPlot/QuiverPlotOpDesc.scala

"attributeTypeRules": { "value": { "enum": ["integer", "long", "double"] } }

Its fields are x, y, u, v (all required, no value). All four are used as numeric vector coordinates in ff.create_quiver(x, y, u, v), so all four should be numeric.

RangeSlidercommon/.../visualization/rangeSlider/RangeSliderOpDesc.scala

"attributeTypeRules": { "value": { "enum": ["integer", "long", "double"] } }

Its fields are Y-axis and X-axis (no value). The y-axis column is aggregated (groupby(X-axis)[Y-axis].mean()/.sum()), so it must be numeric; the x-axis is only a grouping key and can be any type.

Expected: the numeric fields (QuiverPlot x/y/u/v; RangeSlider Y-axis) are constrained to numeric columns, as clearly intended by the (mistargeted) rule.

How to reproduce?

A — user-facing: In a Quiver Plot (or Range Slider), the column pickers for the numeric fields let you pick a string column; selecting one then fails at chart time instead of being prevented up front.

B — confirmed against main: in both files the attributeTypeRules key is "value", but neither operator declares a value field (QuiverPlot: x/y/u/v; RangeSlider: Y-axis/X-axis), so the rule is inert and no type constraint is applied.

Proposed fix: retarget each rule to the real field name(s) (keys match the @JsonProperty name):

  • QuiverPlot: "x", "y", "u", "v" → numeric
  • RangeSlider: "Y-axis" → numeric

Version/Branch

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions