-
Notifications
You must be signed in to change notification settings - Fork 13.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
fix: Drill to detail on values with comma #21151
fix: Drill to detail on values with comma #21151
Conversation
@@ -39,12 +39,12 @@ export type QueryObjectFilterClause = { | |||
} & ( | |||
| { | |||
op: BinaryOperator; | |||
val: string | number | boolean; | |||
val: string | number | boolean | null | 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.
Why use Date and null object on the filter?
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.
Because the values come from the labelMap
:
interface EChartTransformedProps<F> {
labelMap: Record<string, DataRecordValue[]>;
...
}
type DataRecordValue = number | string | boolean | Date | null;
@@ -83,6 +83,7 @@ export interface ChartDataResponseResult { | |||
export interface TimeseriesChartDataResponseResult | |||
extends ChartDataResponseResult { | |||
data: TimeseriesDataRecord[]; | |||
label_map: Record<string, DataRecordValue[]>; |
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.
nits:
label_map: Record<string, DataRecordValue[]>; | |
label_map: Record<string, 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.
I'm using DataRecordValue
to keep compatibility with labelMap
defined in EChartTransformedProps
.
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.
the value of label_map
represents parts of columns, it will not be null or 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.
Got it. I'll open a follow-up to fix all labelMap
references then.
SUMMARY
This PR fixes a bug that was causing incorrect values when right-clicking on charts that contain values with commas.
Original issue: #20728 (comment)
@codyml
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2022-08-22.at.11.39.09.AM.mov
TESTING INSTRUCTIONS
Check that the correct values are displayed when interacting with charts that contain values with commas.
ADDITIONAL INFORMATION