-
Notifications
You must be signed in to change notification settings - Fork 946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[front] fix date format (timestamp) in horizontal bars widget (#7921) #8032
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8032 +/- ##
==========================================
+ Coverage 66.14% 66.21% +0.06%
==========================================
Files 597 597
Lines 60375 60457 +82
Branches 6190 6193 +3
==========================================
+ Hits 39937 40031 +94
+ Misses 20438 20426 -12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ✅
if (yFormatter && typeof value === 'number') { | ||
return yFormatter(value); | ||
} | ||
if (typeof value === 'string' && value.length === 15) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What means this value.length === 15
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamp has 15 characters...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion the fix should be done in the file calling the function horizontalBarsChartOptions
, not in this file. We have the possibility already to pass a function yFormatter
to format the value. So use this to transform the timestamp in date string when necessary directly in the widget component when the attribute is a date.
f8359b7
to
558e6c1
Compare
3ae3b5f
to
a3eae2e
Compare
0d02299
to
3f0773a
Compare
4be8415
to
f25e746
Compare
Proposed changes
Related issues
Checklist
Further comments