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
I noticed that when using datum in an encoding field, the type is inferred automatically:
When using a column/field name instead of datum the default is nominal regardless of the type of values in the data. I am guessing this is because the data values are not necessarily directly present in the VegaLite spec (could be a URL e.g.). I wonder if it would be possible to do a lookup similar to the transform_calculate + datum[column_name] approach demonstrated in #7365 (comment) to inspect at the first value of each field/column in the data, and then infer the type of that value using the same rules as datum is currently using and apply it as the default type for that encoding field?
The text was updated successfully, but these errors were encountered:
Yes, I had this idea before and what we need is infrastructure for tracking data through transforms and to encodings. It would need someone to dig into the compiler a bit deeper but it should be totally doable.
I noticed that when using
datum
in an encoding field, the type is inferred automatically:When using a column/field name instead of
datum
the default is nominal regardless of the type of values in the data. I am guessing this is because the data values are not necessarily directly present in the VegaLite spec (could be a URL e.g.). I wonder if it would be possible to do a lookup similar to thetransform_calculate
+datum[column_name]
approach demonstrated in #7365 (comment) to inspect at the first value of each field/column in the data, and then infer the type of that value using the same rules asdatum
is currently using and apply it as the default type for that encoding field?The text was updated successfully, but these errors were encountered: