Skip to content

UTC date labels do not display properly, seem to be using local browser timezone #7795

@mjtribble

Description

@mjtribble

Date labels are shifted one day when viewed in mountain time. Updating browser timezone to UTC shows correct labels

Open in editor

{
  "data": {
    "format": {
      "type": "csv"
    },
    "values": "dt,value\n2021-10-09,450.0,\n2021-10-10,0.0,\n2021-10-11,410.0,\n"
  },
  "mark": {
    "tooltip": true,
    "type": "bar",
    "line": {
      "color": "darkgreen"
    },
    "point": false
  },
  "encoding": {
    "x": {
      "field": "dt",
      "timeUnit": "utcyearmonthdate",
      "title": "Day",
      "type": "ordinal",
      "axis": {
        "grid": false,
        "labelAngle": 0,
        "labelFont": "AgrilystApercu",
        "format": "%b %d",
        "ticks": true,
        "labelPadding": 6,
        "titlePadding": 15
      }
    },
    "y": {
      "field": "value",
      "type": "quantitative",
      "title": "count",
      "axis": {
        "grid": true,
        "domainColor": "white"
      }
    },
    "color": {
      "value": "#5391f5"
    },
    "opacity": {
      "value": 0.4
    }
  }
}

Screen Shot 2021-11-10 at 10 37 31 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions