timeUnit step does not respect cross month bins
See original GitHub issueSee the following animated gif: With a new month it starts a new bin The first bin (not sure if it still called bins with timeUnit steps), goes from 31 dec to jan 3 and the 2nd bin jan 1 tot jan 4.
This leads to overlapping bins. I’m not sure if this is intended. The used spec (derivitated from https://vega.github.io/vega-lite/docs/timeunit.html#example-customizing-step)
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"values": [
{"date": "Sat, 31 Dec 2011 00:00:00", "distance": 1},
{"date": "Sat, 31 Dec 2011 00:01:00", "distance": 1},
{"date": "Sat, 31 Dec 2011 00:02:00", "distance": 2},
{"date": "Sun, 01 Jan 2012 00:00:00", "distance": 1},
{"date": "Sun, 01 Jan 2012 00:01:00", "distance": 1},
{"date": "Sun, 01 Jan 2012 00:02:00", "distance": 2},
{"date": "Mon, 02 Jan 2012 00:03:00", "distance": 1},
{"date": "Mon, 02 Jan 2012 00:04:00", "distance": 4},
{"date": "Mon, 02 Jan 2012 00:05:00", "distance": 2},
{"date": "Tue, 03 Jan 2012 00:06:00", "distance": 5},
{"date": "Tue, 03 Jan 2012 00:07:00", "distance": 2},
{"date": "Tue, 03 Jan 2012 00:08:00", "distance": 6},
{"date": "Tue, 03 Jan 2012 00:09:00", "distance": 4},
{"date": "Wed, 04 Jan 2012 00:10:00", "distance": 1},
{"date": "Wed, 04 Jan 2012 00:11:00", "distance": 1},
{"date": "Wed, 04 Jan 2012 00:12:00", "distance": 3},
{"date": "Thu, 05 Jan 2012 00:13:00", "distance": 0},
{"date": "Thu, 05 Jan 2012 00:14:00", "distance": 2},
{"date": "Thu, 05 Jan 2012 00:15:00", "distance": 3}
]
},
"mark": "bar",
"encoding": {
"stroke": {
"condition": {"selection": "HOVER", "value": "black"},
"value": null
},
"x": {
"field": "date",
"type": "temporal",
"timeUnit": {"unit": "yearmonthdate", "step": 3}
},
"y": {"field": "distance", "type": "quantitative", "aggregate": "sum"},
"tooltip": [
{
"field": "yearmonthdate_step_3_date",
"type": "temporal",
"title": "Datum start"
},
{
"field": "yearmonthdate_step_3_date_end",
"type": "temporal",
"title": "Datum end"
}
],
"color": {"field": "distance", "type": "quantitative", "aggregate": "sum"}
},
"selection": {"HOVER": {"empty": "none", "on": "mouseover", "type": "single"}}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
LinearLayout | Android Developers
android:alwaysDrawnWithCache, Defines whether the ViewGroup should always draw its children using their drawing cache or not.
Read more >NetCDF Climate and Forecast (CF) Metadata Conventions
Since climate and forecast data are often not simply representative of points in space/time, other extensions provide for the description of coordinate ...
Read more >CY 2023 Payment Policies Under the Physician Fee Schedule ...
This major proposed rule addresses: changes to the physician fee schedule (PFS); other changes to Medicare Part B payment policies to ensure ...
Read more >Demantra Demand Management to EBS Integration
Demantra Demand Management to EBS Integration. This chapter overviews integration processes that synchronize or move data between the Oracle Demantra and ...
Read more >Cross-Scale Causality and Information Transfer in Simulated ...
An information-theoretic approach for detecting causality and information transfer was applied to phases and amplitudes of oscillatory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh perfect! I missed that issue. You (plural) are doing great, take it easy!
Coming soon: https://github.com/vega/vega-lite/issues/6348.
It should be pretty straight forward but I haven’t had cycles for it yet.