should the use of timeUnit
prevent type: "nominal"
?
#3744
Replies: 2 comments
-
Thanks for reporting! This is happening because of the automatic type inference for pandas dataframes, which recognizes that the Another approach to solve this would be to rely on VegaLite to infer types when there is an aggregation or timeunit present (which I think always works as expected in those cases) #2584 |
Beta Was this translation helpful? Give feedback.
-
Yeah I think the latter would probably work ok. I really like that Altair auto-detects non-nominal types from dataframes in general, but in this case it's getting in the way a bit :) |
Beta Was this translation helpful? Give feedback.
-
In the following case (under
altair=5.0.0rc1
), I'm usingtimeUnit()
on a column containing strings, and the resulting JSON spec forcestype: "nominal"
which prevents Vega-Lite from inferring it's actually"temporal"
:Beta Was this translation helpful? Give feedback.
All reactions