plotly / plotly/plotly.js

Add option to format dates as UTC

Open
#1,956 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Currently, Plotly offers the tickformat property to specify date formats. But the results are always shown in local time. I see no way to format the dates as UTC other than manually transforming all of the dates to offset based on the current time zone so they look like the equivalent UTC time. And obviously, this is a major pain.

D3 can certainly handle UTC dates, so Plotly really needs to expose something to allow dates to be shown as UTC.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Plotly's tickformat date handling and compare it with D3's utcFormat behavior. Determine where a UTC-formatting option belongs, then verify that date labels render in UTC without requiring callers to transform their data.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.