diff --git a/examples/compiled/bar_month_band.png b/examples/compiled/bar_month_band.png index 1e97817f4d..de07c45c28 100644 Binary files a/examples/compiled/bar_month_band.png and b/examples/compiled/bar_month_band.png differ diff --git a/examples/compiled/bar_month_band.svg b/examples/compiled/bar_month_band.svg index 0037b0e8fd..0267e114fb 100644 --- a/examples/compiled/bar_month_band.svg +++ b/examples/compiled/bar_month_band.svg @@ -1 +1 @@ -JanFebMarAprMayJunJulAugSepOctNovDecJandate (month)012345Mean of precipitation \ No newline at end of file +JanFebMarAprMayJunJulAugSepOctNovDecJandate (month)012345Mean of precipitation \ No newline at end of file diff --git a/examples/compiled/bar_month_band.vg.json b/examples/compiled/bar_month_band.vg.json index ea44f12229..b6ec3642bc 100644 --- a/examples/compiled/bar_month_band.vg.json +++ b/examples/compiled/bar_month_band.vg.json @@ -39,15 +39,31 @@ "from": {"data": "source_0"}, "encode": { "update": { - "width": {"value": 18}, + "width": {"value": {"band": 0.7}}, "fill": {"value": "#4c78a8"}, "ariaRoleDescription": {"value": "bar"}, "description": { "signal": "\"date (month): \" + (timeFormat(datum[\"month_date\"], timeUnitSpecifier([\"month\"], {\"year-month\":\"%b %Y \",\"year-month-date\":\"%b %d, %Y \"}))) + \"; Mean of precipitation: \" + (format(datum[\"mean_precipitation\"], \"\"))" }, - "xc": { - "signal": "scale(\"x\", 0.5 * datum[\"month_date\"] + 0.5 * datum[\"month_date_end\"])" - }, + "x2": [ + { + "test": "!isValid(datum[\"month_date\"]) || !isFinite(+datum[\"month_date\"])", + "value": 0 + }, + { + "signal": "scale(\"x\", 0.15000000000000002 * datum[\"month_date\"] + 0.85 * datum[\"month_date_end\"])", + "offset": 1 + } + ], + "x": [ + { + "test": "!isValid(datum[\"month_date\"]) || !isFinite(+datum[\"month_date\"])", + "value": 0 + }, + { + "signal": "scale(\"x\", 0.85 * datum[\"month_date\"] + 0.15000000000000002 * datum[\"month_date_end\"])" + } + ], "y": {"scale": "y", "field": "mean_precipitation"}, "y2": {"scale": "y", "value": 0} }