diff --git a/examples/compiled/bar_binned_yearmonth_grouped_center_band.png b/examples/compiled/bar_binned_yearmonth_grouped_center_band.png
index 96f3a926395..c47310973c3 100644
Binary files a/examples/compiled/bar_binned_yearmonth_grouped_center_band.png and b/examples/compiled/bar_binned_yearmonth_grouped_center_band.png differ
diff --git a/examples/compiled/bar_binned_yearmonth_grouped_center_band.svg b/examples/compiled/bar_binned_yearmonth_grouped_center_band.svg
index 0d88d3b01a0..1d3814b5623 100644
--- a/examples/compiled/bar_binned_yearmonth_grouped_center_band.svg
+++ b/examples/compiled/bar_binned_yearmonth_grouped_center_band.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/bar_binned_yearmonth_grouped_center_band.vg.json b/examples/compiled/bar_binned_yearmonth_grouped_center_band.vg.json
index 4d0ef4b7d47..addd923f0b1 100644
--- a/examples/compiled/bar_binned_yearmonth_grouped_center_band.vg.json
+++ b/examples/compiled/bar_binned_yearmonth_grouped_center_band.vg.json
@@ -21,6 +21,16 @@
"expr": "timeOffset('month', datum['date'], 1)",
"as": "date_end"
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['date'], -1) + 0.5 * datum['date']",
+ "as": "date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['date'] + 0.5 * datum['date_end']",
+ "as": "date_offsetted_rect_end"
+ },
{
"type": "stack",
"groupby": ["date", "symbol"],
@@ -65,7 +75,10 @@
{
"name": "x",
"type": "time",
- "domain": {"data": "source_0", "fields": ["date", "date_end"]},
+ "domain": {
+ "data": "source_0",
+ "fields": ["date_offsetted_rect_start", "date_offsetted_rect_end"]
+ },
"range": [0, {"signal": "width"}]
},
{
@@ -82,10 +95,10 @@
"domain": {"data": "source_0", "field": "symbol", "sort": true},
"range": [
{
- "signal": "0.1 * (scale('x', datetime(2001, 1, 1, 0, 0, 0, 0)) - scale('x', datetime(2001, 0, 1, 0, 0, 0, 0)))"
+ "signal": "-0.4 * (scale('x', datetime(2001, 1, 1, 0, 0, 0, 0)) - scale('x', datetime(2001, 0, 1, 0, 0, 0, 0)))"
},
{
- "signal": "0.9 * (scale('x', datetime(2001, 1, 1, 0, 0, 0, 0)) - scale('x', datetime(2001, 0, 1, 0, 0, 0, 0)))"
+ "signal": "0.4 * (scale('x', datetime(2001, 1, 1, 0, 0, 0, 0)) - scale('x', datetime(2001, 0, 1, 0, 0, 0, 0)))"
}
]
},
diff --git a/examples/compiled/bar_binned_yearmonth_label_band_center.png b/examples/compiled/bar_binned_yearmonth_label_band_center.png
index 39cb33861ee..76e09f342dc 100644
Binary files a/examples/compiled/bar_binned_yearmonth_label_band_center.png and b/examples/compiled/bar_binned_yearmonth_label_band_center.png differ
diff --git a/examples/compiled/bar_binned_yearmonth_label_band_center.svg b/examples/compiled/bar_binned_yearmonth_label_band_center.svg
index c60c5521241..010afea05f9 100644
--- a/examples/compiled/bar_binned_yearmonth_label_band_center.svg
+++ b/examples/compiled/bar_binned_yearmonth_label_band_center.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/bar_binned_yearmonth_label_band_center.vg.json b/examples/compiled/bar_binned_yearmonth_label_band_center.vg.json
index ee2febf0ffe..91204d23343 100644
--- a/examples/compiled/bar_binned_yearmonth_label_band_center.vg.json
+++ b/examples/compiled/bar_binned_yearmonth_label_band_center.vg.json
@@ -28,6 +28,16 @@
"expr": "timeOffset('month', datum['date'], 1)",
"as": "date_end"
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['date'], -1) + 0.5 * datum['date']",
+ "as": "date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['date'] + 0.5 * datum['date_end']",
+ "as": "date_offsetted_rect_end"
+ },
{
"type": "stack",
"groupby": ["date"],
@@ -68,14 +78,14 @@
},
"x2": {
"scale": "x",
- "field": "date",
+ "field": "date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_end\"]) - scale(\"x\", datum[\"date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_end\"]) - scale(\"x\", datum[\"date\"])))) : 0.5)"
}
},
"x": {
"scale": "x",
- "field": "date_end",
+ "field": "date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_end\"]) - scale(\"x\", datum[\"date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_end\"]) - scale(\"x\", datum[\"date\"])))) : -0.5)"
}
@@ -111,8 +121,8 @@
"type": "time",
"domain": {
"fields": [
- {"data": "data_0", "field": "date"},
- {"data": "data_0", "field": "date_end"},
+ {"data": "data_0", "field": "date_offsetted_rect_start"},
+ {"data": "data_0", "field": "date_offsetted_rect_end"},
{"data": "data_1", "field": "date"},
{"data": "data_1", "field": "date_end"}
]
diff --git a/examples/compiled/bar_month_temporal_band_center.png b/examples/compiled/bar_month_temporal_band_center.png
index 61c1c04fab5..62203cbc3b9 100644
Binary files a/examples/compiled/bar_month_temporal_band_center.png and b/examples/compiled/bar_month_temporal_band_center.png differ
diff --git a/examples/compiled/bar_month_temporal_band_center.svg b/examples/compiled/bar_month_temporal_band_center.svg
index cf84822e487..4c5776ae762 100644
--- a/examples/compiled/bar_month_temporal_band_center.svg
+++ b/examples/compiled/bar_month_temporal_band_center.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/bar_month_temporal_band_center.vg.json b/examples/compiled/bar_month_temporal_band_center.vg.json
index 25cac61d2bf..597691718b3 100644
--- a/examples/compiled/bar_month_temporal_band_center.vg.json
+++ b/examples/compiled/bar_month_temporal_band_center.vg.json
@@ -17,9 +17,24 @@
"units": ["month"],
"as": ["month_date", "month_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['month_date'], -1) + 0.5 * datum['month_date']",
+ "as": "month_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['month_date'] + 0.5 * datum['month_date_end']",
+ "as": "month_date_offsetted_rect_end"
+ },
{
"type": "aggregate",
- "groupby": ["month_date", "month_date_end"],
+ "groupby": [
+ "month_date",
+ "month_date_end",
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ],
"ops": ["mean"],
"fields": ["precipitation"],
"as": ["mean_precipitation"]
@@ -46,14 +61,14 @@
},
"x2": {
"scale": "x",
- "field": "month_date",
+ "field": "month_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])))) : 0.5)"
}
},
"x": {
"scale": "x",
- "field": "month_date_end",
+ "field": "month_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])))) : -0.5)"
}
@@ -70,7 +85,10 @@
"type": "time",
"domain": {
"data": "source_0",
- "fields": ["month_date", "month_date_end"]
+ "fields": [
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ]
},
"range": [0, {"signal": "width"}]
},
diff --git a/examples/compiled/bar_month_temporal_band_center_config.png b/examples/compiled/bar_month_temporal_band_center_config.png
index 61c1c04fab5..62203cbc3b9 100644
Binary files a/examples/compiled/bar_month_temporal_band_center_config.png and b/examples/compiled/bar_month_temporal_band_center_config.png differ
diff --git a/examples/compiled/bar_month_temporal_band_center_config.svg b/examples/compiled/bar_month_temporal_band_center_config.svg
index cf84822e487..4c5776ae762 100644
--- a/examples/compiled/bar_month_temporal_band_center_config.svg
+++ b/examples/compiled/bar_month_temporal_band_center_config.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/bar_month_temporal_band_center_config.vg.json b/examples/compiled/bar_month_temporal_band_center_config.vg.json
index 25cac61d2bf..597691718b3 100644
--- a/examples/compiled/bar_month_temporal_band_center_config.vg.json
+++ b/examples/compiled/bar_month_temporal_band_center_config.vg.json
@@ -17,9 +17,24 @@
"units": ["month"],
"as": ["month_date", "month_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['month_date'], -1) + 0.5 * datum['month_date']",
+ "as": "month_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['month_date'] + 0.5 * datum['month_date_end']",
+ "as": "month_date_offsetted_rect_end"
+ },
{
"type": "aggregate",
- "groupby": ["month_date", "month_date_end"],
+ "groupby": [
+ "month_date",
+ "month_date_end",
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ],
"ops": ["mean"],
"fields": ["precipitation"],
"as": ["mean_precipitation"]
@@ -46,14 +61,14 @@
},
"x2": {
"scale": "x",
- "field": "month_date",
+ "field": "month_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])))) : 0.5)"
}
},
"x": {
"scale": "x",
- "field": "month_date_end",
+ "field": "month_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"month_date_end\"]) - scale(\"x\", datum[\"month_date\"])))) : -0.5)"
}
@@ -70,7 +85,10 @@
"type": "time",
"domain": {
"data": "source_0",
- "fields": ["month_date", "month_date_end"]
+ "fields": [
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ]
},
"range": [0, {"signal": "width"}]
},
diff --git a/examples/compiled/bar_simple_binned_timeunit_special_chars.vg.json b/examples/compiled/bar_simple_binned_timeunit_special_chars.vg.json
index 191f43dd0da..2fb873170ff 100644
--- a/examples/compiled/bar_simple_binned_timeunit_special_chars.vg.json
+++ b/examples/compiled/bar_simple_binned_timeunit_special_chars.vg.json
@@ -31,7 +31,7 @@
{"type": "formula", "expr": "toDate(datum[\"a.b\"])", "as": "a.b"},
{
"type": "formula",
- "expr": "timeOffset('date', datum['a.b'], 1)",
+ "expr": "utcOffset('date', datum['a.b'], 1)",
"as": "a.b_end"
},
{
diff --git a/examples/compiled/bar_yearmonth_center_band.png b/examples/compiled/bar_yearmonth_center_band.png
index 88354b541e7..4ac977a0c83 100644
Binary files a/examples/compiled/bar_yearmonth_center_band.png and b/examples/compiled/bar_yearmonth_center_band.png differ
diff --git a/examples/compiled/bar_yearmonth_center_band.svg b/examples/compiled/bar_yearmonth_center_band.svg
index 01afff80b15..4e3fa4a8cc7 100644
--- a/examples/compiled/bar_yearmonth_center_band.svg
+++ b/examples/compiled/bar_yearmonth_center_band.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/bar_yearmonth_center_band.vg.json b/examples/compiled/bar_yearmonth_center_band.vg.json
index 3427f5e5de3..4886b6c607b 100644
--- a/examples/compiled/bar_yearmonth_center_band.vg.json
+++ b/examples/compiled/bar_yearmonth_center_band.vg.json
@@ -18,9 +18,24 @@
"units": ["year", "month"],
"as": ["yearmonth_date", "yearmonth_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['yearmonth_date'], -1) + 0.5 * datum['yearmonth_date']",
+ "as": "yearmonth_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['yearmonth_date'] + 0.5 * datum['yearmonth_date_end']",
+ "as": "yearmonth_date_offsetted_rect_end"
+ },
{
"type": "aggregate",
- "groupby": ["yearmonth_date", "yearmonth_date_end"],
+ "groupby": [
+ "yearmonth_date",
+ "yearmonth_date_end",
+ "yearmonth_date_offsetted_rect_start",
+ "yearmonth_date_offsetted_rect_end"
+ ],
"ops": ["mean"],
"fields": ["temp_max"],
"as": ["mean_temp_max"]
@@ -47,14 +62,14 @@
},
"x2": {
"scale": "x",
- "field": "yearmonth_date",
+ "field": "yearmonth_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"yearmonth_date_end\"]) - scale(\"x\", datum[\"yearmonth_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"yearmonth_date_end\"]) - scale(\"x\", datum[\"yearmonth_date\"])))) : 0.5)"
}
},
"x": {
"scale": "x",
- "field": "yearmonth_date_end",
+ "field": "yearmonth_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"yearmonth_date_end\"]) - scale(\"x\", datum[\"yearmonth_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"yearmonth_date_end\"]) - scale(\"x\", datum[\"yearmonth_date\"])))) : -0.5)"
}
@@ -71,7 +86,10 @@
"type": "time",
"domain": {
"data": "source_0",
- "fields": ["yearmonth_date", "yearmonth_date_end"]
+ "fields": [
+ "yearmonth_date_offsetted_rect_start",
+ "yearmonth_date_offsetted_rect_end"
+ ]
},
"range": [0, {"signal": "width"}]
},
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band.png b/examples/compiled/rect_heatmap_weather_temporal_center_band.png
index b237138985f..1e05b81d864 100644
Binary files a/examples/compiled/rect_heatmap_weather_temporal_center_band.png and b/examples/compiled/rect_heatmap_weather_temporal_center_band.png differ
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band.svg b/examples/compiled/rect_heatmap_weather_temporal_center_band.svg
index a2e48387e8f..52c09d0b29b 100644
--- a/examples/compiled/rect_heatmap_weather_temporal_center_band.svg
+++ b/examples/compiled/rect_heatmap_weather_temporal_center_band.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band.vg.json b/examples/compiled/rect_heatmap_weather_temporal_center_band.vg.json
index f020b83f2ba..ddafffe73d9 100644
--- a/examples/compiled/rect_heatmap_weather_temporal_center_band.vg.json
+++ b/examples/compiled/rect_heatmap_weather_temporal_center_band.vg.json
@@ -24,19 +24,43 @@
"units": ["date"],
"as": ["date_date", "date_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('date', datum['date_date'], -1) + 0.5 * datum['date_date']",
+ "as": "date_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['date_date'] + 0.5 * datum['date_date_end']",
+ "as": "date_date_offsetted_rect_end"
+ },
{
"field": "date",
"type": "timeunit",
"units": ["month"],
"as": ["month_date", "month_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['month_date'], -1) + 0.5 * datum['month_date']",
+ "as": "month_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['month_date'] + 0.5 * datum['month_date_end']",
+ "as": "month_date_offsetted_rect_end"
+ },
{
"type": "aggregate",
"groupby": [
"date_date",
"date_date_end",
+ "date_date_offsetted_rect_start",
+ "date_date_offsetted_rect_end",
"month_date",
- "month_date_end"
+ "month_date_end",
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
],
"ops": ["max"],
"fields": ["temp_max"],
@@ -63,28 +87,28 @@
},
"x2": {
"scale": "x",
- "field": "date_date",
+ "field": "date_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])))) : 0)"
}
},
"x": {
"scale": "x",
- "field": "date_date_end",
+ "field": "date_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])))) : 0)"
}
},
"y2": {
"scale": "y",
- "field": "month_date",
+ "field": "month_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])))) : 0)"
}
},
"y": {
"scale": "y",
- "field": "month_date_end",
+ "field": "month_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])))) : 0)"
}
@@ -97,7 +121,13 @@
{
"name": "x",
"type": "time",
- "domain": {"data": "source_0", "fields": ["date_date", "date_date_end"]},
+ "domain": {
+ "data": "source_0",
+ "fields": [
+ "date_date_offsetted_rect_start",
+ "date_date_offsetted_rect_end"
+ ]
+ },
"range": [0, {"signal": "width"}]
},
{
@@ -105,7 +135,10 @@
"type": "time",
"domain": {
"data": "source_0",
- "fields": ["month_date", "month_date_end"]
+ "fields": [
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ]
},
"range": [{"signal": "height"}, 0]
},
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.png b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.png
index b237138985f..1e05b81d864 100644
Binary files a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.png and b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.png differ
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.svg b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.svg
index a2e48387e8f..52c09d0b29b 100644
--- a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.svg
+++ b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.vg.json b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.vg.json
index f020b83f2ba..ddafffe73d9 100644
--- a/examples/compiled/rect_heatmap_weather_temporal_center_band_config.vg.json
+++ b/examples/compiled/rect_heatmap_weather_temporal_center_band_config.vg.json
@@ -24,19 +24,43 @@
"units": ["date"],
"as": ["date_date", "date_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('date', datum['date_date'], -1) + 0.5 * datum['date_date']",
+ "as": "date_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['date_date'] + 0.5 * datum['date_date_end']",
+ "as": "date_date_offsetted_rect_end"
+ },
{
"field": "date",
"type": "timeunit",
"units": ["month"],
"as": ["month_date", "month_date_end"]
},
+ {
+ "type": "formula",
+ "expr": "0.5 * timeOffset('month', datum['month_date'], -1) + 0.5 * datum['month_date']",
+ "as": "month_date_offsetted_rect_start"
+ },
+ {
+ "type": "formula",
+ "expr": "0.5 * datum['month_date'] + 0.5 * datum['month_date_end']",
+ "as": "month_date_offsetted_rect_end"
+ },
{
"type": "aggregate",
"groupby": [
"date_date",
"date_date_end",
+ "date_date_offsetted_rect_start",
+ "date_date_offsetted_rect_end",
"month_date",
- "month_date_end"
+ "month_date_end",
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
],
"ops": ["max"],
"fields": ["temp_max"],
@@ -63,28 +87,28 @@
},
"x2": {
"scale": "x",
- "field": "date_date",
+ "field": "date_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])))) : 0)"
}
},
"x": {
"scale": "x",
- "field": "date_date_end",
+ "field": "date_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"x\", datum[\"date_date_end\"]) - scale(\"x\", datum[\"date_date\"])))) : 0)"
}
},
"y2": {
"scale": "y",
- "field": "month_date",
+ "field": "month_date_offsetted_rect_start",
"offset": {
"signal": "0.5 + (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])) < 0.25 ? 0.5 * (0.25 - (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])))) : 0)"
}
},
"y": {
"scale": "y",
- "field": "month_date_end",
+ "field": "month_date_offsetted_rect_end",
"offset": {
"signal": "0.5 + (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])) < 0.25 ? -0.5 * (0.25 - (abs(scale(\"y\", datum[\"month_date_end\"]) - scale(\"y\", datum[\"month_date\"])))) : 0)"
}
@@ -97,7 +121,13 @@
{
"name": "x",
"type": "time",
- "domain": {"data": "source_0", "fields": ["date_date", "date_date_end"]},
+ "domain": {
+ "data": "source_0",
+ "fields": [
+ "date_date_offsetted_rect_start",
+ "date_date_offsetted_rect_end"
+ ]
+ },
"range": [0, {"signal": "width"}]
},
{
@@ -105,7 +135,10 @@
"type": "time",
"domain": {
"data": "source_0",
- "fields": ["month_date", "month_date_end"]
+ "fields": [
+ "month_date_offsetted_rect_start",
+ "month_date_offsetted_rect_end"
+ ]
},
"range": [{"signal": "height"}, 0]
},
diff --git a/examples/compiled/time_parse_binnedutc.vg.json b/examples/compiled/time_parse_binnedutc.vg.json
index a739f18cb5d..55dc8f7d78d 100644
--- a/examples/compiled/time_parse_binnedutc.vg.json
+++ b/examples/compiled/time_parse_binnedutc.vg.json
@@ -16,7 +16,7 @@
{"type": "formula", "expr": "toDate(datum[\"date\"])", "as": "date"},
{
"type": "formula",
- "expr": "timeOffset('hours', datum['date'], 1)",
+ "expr": "utcOffset('hours', datum['date'], 1)",
"as": "date_end"
}
]