This is a postscript to https://bl.ocks.org/ijlyttle/84ce12ce2c1093070f645a2bae3b8fa0
The x scale is UTC and works as I expect; a solution is to add a UTC scale to the tooltip:
"tooltip": [
{
"field": "date",
"type": "temporal",
"format": "%Y-%m-%d",
"scale": {
"type": "utc"
}
},
{
"field": "value",
"type": "quantitative"
}
]
xxxxxxxxxx
<html>
<head>
<!-- uploaded using vegawidget -->
<script src="https://cdn.jsdelivr.net/npm/vega@4.0.0-rc.2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2.5.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3.14.0"></script>
<link rel="stylesheet" type="text/css" href="vega-embed.css">
</head>
<body>
<div id="vis"></div>
<script type="text/javascript">
const spec = "spec.json";
const opt = {"defaultStyle":true,"renderer":"canvas"};
vegaEmbed('#vis', spec, opt).then(function(result) {
// access view as result.view
}).catch(console.error);
</script>
</body>
</html>
https://cdn.jsdelivr.net/npm/vega@4.0.0-rc.2
https://cdn.jsdelivr.net/npm/vega-lite@2.5.0
https://cdn.jsdelivr.net/npm/vega-embed@3.14.0