plot icon indicating copy to clipboard operation
plot copied to clipboard

The tip mark should respect the associated scale’s (local) time zone, if present

Open tx0c opened this issue 1 year ago • 1 comments

when using x: { type: "time", ... } the a axis ticks are using correct local timezone, but the tip: "x" is still showing with utc timezones,

image

Plot.plot({
  color: { legend:true },
  x: { type: "time", domain: [new Date(Date.UTC(2024,3,8,-8)), new Date] },
  marks: [
    Plot.rectY(
      dataArticlesList,
      Plot.binX({y:"count", fill:"count"}, {x:"created_at", interval: d3.timeHour, tip: "x"})),
    Plot.ruleY([0]),
  ],
  width,
})

tx0c avatar Apr 10 '24 19:04 tx0c

You currently need to use the format option to change how the tip mark formats channel values. But yes, perhaps the tip mark could check whether the channel’s associated scale is in local time.

mbostock avatar Apr 10 '24 20:04 mbostock