You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a Vega-Lite issue in the scenario where a new column is generated by a calculate transform, and then referenced in an encoding channel with bin: true, when that mark is inside a layout.
Here is a working example spec that calculates a new column using joinaggregate and calculate and then uses this column as the x encoding with binning enabled:
Note that the joinaggregate and formula transforms that create the Rating_std column come before the extent and bin transforms that reference this column.
Now make the modification of nesting this same chart, by itself, inside a layer.
Note that the extent and bin transforms are positioned above the creation of the Rating_std column by the joinaggregate and formula transforms.
Does anyone have any initial thoughts on what might trigger the difference in behavior when the chart is nested in a layout? I think this is probably a pretty common scenario (e.g. the original author wanted to overlay a rule on top of a histogram of a calculated column), so I'd like to make some progress on getting to the bottom of it.
Checklist
I checked for duplicate issues (though this is a little hard to search for)
The text was updated successfully, but these errors were encountered:
Bug Description
Root cause of what was originally reported in Vega-Altair in vega/altair#3423 (comment)
There seems to be a Vega-Lite issue in the scenario where a new column is generated by a
calculate
transform, and then referenced in an encoding channel withbin: true
, when that mark is inside a layout.Here is a working example spec that calculates a new column using
joinaggregate
andcalculate
and then uses this column as thex
encoding with binning enabled:This generates the following correct Vega transform pipeline:
Note that the
joinaggregate
andformula
transforms that create theRating_std
column come before theextent
andbin
transforms that reference this column.Now make the modification of nesting this same chart, by itself, inside a
layer
.Now the rect marks fail to display because this is the transform pipeline generated:
Note that the
extent
andbin
transforms are positioned above the creation of theRating_std
column by thejoinaggregate
andformula
transforms.Does anyone have any initial thoughts on what might trigger the difference in behavior when the chart is nested in a layout? I think this is probably a pretty common scenario (e.g. the original author wanted to overlay a rule on top of a histogram of a calculated column), so I'd like to make some progress on getting to the bottom of it.
Checklist
The text was updated successfully, but these errors were encountered: