All examples By author By category About

ijlyttle

Tooltip issue

The tooltip does not appear as I expect. The date "2018-01-01" appears as "2017-12-31". Please note that my computer is in the "America/Chicago" time zone, so at "2018-01-01" UTC, it was "2017-12-31" in my timezone.

I am using a toy dataset with dates 2018-01-01 to 2018-01-07, inclusive.

The x scale is UTC, and I expect the tooltip to parse date as UTC because the date string is in ISO format.

If I specify the date in the tooltip as a nominal variable, it works as I expect.

    "tooltip": [
      {
        "field": "date",
        "type": "nominal"
      },
      {
        "field": "value",
        "type": "quantitative"
      }
    ]

Update

A solution to the problem is to put a UTC scale with the tooltip: https://bl.ocks.org/ijlyttle/bccff7673c98e61b887684dbe597cbd3