Replies: 1 comment 2 replies
-
Hmm. Based on your description, my first inclination is that the issue is due to the underlying data type used in DuckDB. If so--and if the timestamps are being represented as type "TIMESTAMP WITH TIME ZONE" in DuckDB--the following PR (which has been merged but not yet released), should fix the issue: #234 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have had a great time using Mosaic so far - thank you for all the work building it!
I hit a snag maybe someone will know how to overcome. I can't seem to draw a plot with datetime-formatted xTicks using the Jupyter widget (i.e. json encoding). An MRE of what I'm trying to accomplish,
which draws the plot except the x-ticks are formatted for integers instead of datetimes.
Things I've tried
vg.xTickFormat
. Unfortunately, for my current use-case accomplishing this via the Jupyter widget is important to me.{"xTickFormat": "<some string>"}
to the spec, but it seems that the only tick formats accepted are d3-format strings which only operate on numbers and not datetimes.{"xTickFormat": "$myTimeFormatter"}
but there didn't seem a way to add a function paremeter via the json spec, and defining$myTimeFormatter = function [...]
in the global namespace via some other jupyter cell that outputs javascript did not seem to do the trick either (I think the module codegen explicitly defines the parameter at the beginning).Curiously, when I use a date dtype (as opposed to datetimes which are what I really want) the formatting works nicely by default.
Beta Was this translation helpful? Give feedback.
All reactions