Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default hour format includes AM/PM #3116

Open
domoritz opened this issue Mar 12, 2021 · 2 comments
Open

Default hour format includes AM/PM #3116

domoritz opened this issue Mar 12, 2021 · 2 comments
Labels
enhancement For enhancement of existing features

Comments

@domoritz
Copy link
Member

domoritz commented Mar 12, 2021

Open the Chart in the Vega Editor

image

I couldn't find a way to remove AP/PM from the default time format in the config.

Can we allow an object (https://github.com/vega/vega/blob/ca27004f8c3ad8aa94f017fb5df6bf90748bda92/packages/vega-format/README.md#timeFormat) for time format: Open the Chart in the Vega Editor

        "time": {
          "year": "%Y",
          "quarter": "%B",
          "month": "%B",
          "week": "%b %d",
          "date": "%a %d",
          "hours": "%H",
          "minutes": "%I:%M",
          "seconds": ":%S",
          "milliseconds": ".%L"
        },
@domoritz domoritz added the bug For bugs or other software errors label Mar 12, 2021
@jheer jheer added question For general questions and clarifications and removed bug For bugs or other software errors labels Mar 12, 2021
@jheer
Copy link
Member

jheer commented Mar 12, 2021

Right now the locale settings do not support time multi format specification. However, you can do this by setting the format property on an axis. See https://vega.github.io/vega/docs/types/#TimeMultiFormat

Here's an updated example: Open in Vega Editor

@domoritz
Copy link
Member Author

domoritz commented Mar 12, 2021

It would be great to support the time multi format in the locale config as well. I'll mark this as an enhancement request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For enhancement of existing features
Projects
None yet
Development

No branches or pull requests

2 participants