vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.68k stars 611 forks source link

automatically imputing time units for ordinal scales #6592

Open kanitw opened 4 years ago

kanitw commented 4 years ago

(Forked from #6589)

For example, there are 7 days in a week, but without manual imputation we show this:

image

cc: @willium

kanitw commented 4 years ago

Though it's unclear (1) what should be the syntax to enable / disable automatic imputation and (2) which time units should be automatically imputed.

For (2), quarter, month, day obviously should be imputed. But what about "date", "hours", "seconds"?

willium commented 4 years ago

(1) If we make tick counts better for the day time units (as in the second screenshot in the original issue), will it be necessary to impute?

for (2) I think those ought to be as well (+ minutes) so long as we don't allow for fractional dates, hours, or minutes, seconds.

willium commented 4 years ago

For documentation's sake, I believe Vega's timeSequence expression will be useful for doing the imputation.

willium commented 4 years ago

For (1) could we not use the existing nice property? for example

If not, I propose we add a boolean temporal scale property impute much like how continuous scales have a interpolate property.

domoritz commented 4 years ago

Help me remember, but I think we removed imputation from time units with ordinal some time ago since we don’t really want imputation for any time unit (e.g. month date) with too many values. While I agree that imputation is often useful, I don’t think I want it to be the default.

colleen-love commented 2 years ago

Would it be possible to update the documentation to say that it's not possible to impute temporal series? Or log a warning in the console?