Reputation: 786
I opened a thread yesterday asking how I should be encoding dates and times. It was suggested that the datetime object would be a good format, as in 'have the least issues'. Here's an example where date time doesn't seem to be working.
Can anyone help me understand why? I've noted an increasing tendency of Vega-Lite examples to use ISO-8601, and in fact if I change this example to use that format it works. So this is more of a 'why isn't it working with datetime'. Is this format still recommended? Does it still even work?
Upvotes: 2
Views: 138
Reputation: 30304
Apologies but I think I misled you with my comment on the other thread (now deleted). Date time objects are only used for filter transform, scale domain, and axis/legend values. I have looked through all the sample json files for Vega Lite and can find no example of specifying a data object like you do in your sample.
Instead, if you specify you data as follows, you don't need to provide a format object.
{"entity": "Wildfire", "date": "2022-10-01", "deaths": 75}
Upvotes: 1