-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fixes for test app crashes for 12 schema data #33542
base: master
Are you sure you want to change the base?
Conversation
📊 Bundle size report✅ No changes found |
Pull request demo site: URL |
@@ -65,6 +66,35 @@ export const updateXValues = (xValues: any[]): any[] => { | |||
}); | |||
return xValues; | |||
}; | |||
|
|||
function parseDateFromString(dateString: string): Date | null { |
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.
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.
no this is for the cases if the dateString is of any format like "2021 Q1". If it contains date string, parseDateFromString will then parse it and return the date.
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 is the output for 2021 Q1
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.
new Date(2021)
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.
and for 2121 Q2?
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.
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.
I am not getting what is 2020 Q2 getting transformed into. What line of code is doing this conversion.
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.
Every year if present is getting extracted as it is without the Q2 and created as a Date. For "2020 Q2" it is new Date(2020) as well as for "2020 Q3".
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.
This is not correct. Q1, Q2, Q3, Q4 should have different x values. In such case we can fall back on vertical stacked bar chart and render x value as string.
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.
Since the string can be anything like "2021 Quater1" or something else, the entire string cannot be used to convert to a unique Date string. So, falling back would be best here.
Fixes for test app crashes for 12 schema data
Fixed schema data numbers 84, 85, 88, 91, 92, 93, 99, 100, 101, 102, 103, 107