Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
Open
Milestone
Description
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'),},});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)
The app is live here:

