Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for Observable Plot'sutc scale. #120

Open
Labels
enhancementNew feature or request
Milestone
@Leftium

Description

@Leftium

Is your feature request related to a problem? Please describe.
I need support for scale typeutc. It is very common to store/process dates in UTC time (Unix epochs).

Describe the solution you'd like
Support forutc scalelike Observable Plot.

Describe alternatives you've considered

  • Observable Plot
  • Transform Unix timestamps (UTC) to conform to local time scale?

Additional context

  • I thought I would try porting my Observable Plot plots to SveltePlot, but lack of UTC support may be a dealbreaker...

An error occurs when I try to portthis code:

const plotOptions = $derived({width: clientWidth,height,marginRight: MARGIN_RIGHT,marginLeft: MARGIN_LEFT,marginTop: 0,marginBottom: 0,y: { axis: null, domain: [yDomainTop, yDomainBottom], range: [0, height] },x: {type: 'utc',axis: xAxis ? true : null,domain: [msStart, msEnd],range: [MARGIN_LEFT, clientWidth - MARGIN_RIGHT],tickFormat: (ms: number) => nsWeatherData.tzFormat(ms, 'ha'),},});

Image

No errors usingtime type scale, but the resulting days are misaligned:

  • 12am June 16 should start at the very left.
  • The cursor is currently over Jun 16 1am, but SveltePlot axis shows 11am June 15.
  • (Showing KST data from CST timezone)

Image


The app is live here:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp