feat: Allow customizing empty-period fill value#1617
Conversation
🦋 Changeset detectedLatest commit: 5621c37 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review: Custom Empty-Period Fill ValueCritical Issues❌ Missing validation for custom fill values → The UI hardcodes
Code Quality
Minor✅ Good: Consolidated settings into a single drawer improves UX |
E2E Test Results✅ All tests passed • 60 passed • 4 skipped • 752s
Tests ran across 4 shards in parallel. |
6843153 to
19ed31d
Compare
19ed31d to
4e1aa86
Compare
ca685aa to
155efb6
Compare
155efb6 to
b83a111
Compare
b83a111 to
766f981
Compare
| }; | ||
|
|
||
| // Factor is only currently available for the time output | ||
| const factor = options.output === 'time' ? (options.factor ?? 1) : 1; |
There was a problem hiding this comment.
style: its better to create an enum for the output
There was a problem hiding this comment.
The existing NumberFormat type already ensures that the value of output is one of 5 values, based on a zod schema:
z.enum(['currency', 'percent', 'byte', 'time', 'number'])There was a problem hiding this comment.
saw that. I meant we can create a ts enum and use z.nativeEnum there so we don't need to hardcode a fixed string
There was a problem hiding this comment.
Ah I understand. Thanks - I will update that if I come across it again in the future.
Closes HDX-3220
Closes HDX-1718
Closes HDX-3205
Summary
This PR adds an option that allows users to customize the 0-fill behavior on time charts. The default behavior remains to fill all empty intervals with 0. The user can now disable the filling behavior. When fill is disabled, series will appear to be interpolated.
This PR also consolidates various display settings into a drawer, replacing the existing Number Format drawer. In the process, various form-related bugs were fixed in the drawer, and micro/nano second input factors were added.
New Chart Display Settings Drawer
Zero-fill behavior
Enabled (default):
Disabled: