-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(dashboards): add legend to queries module charts #103752
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
feat(dashboards): add legend to queries module charts #103752
Conversation
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.
Bug: Missing legend updates for two LINE chart widgets
The PR aims to add legends to query module charts by populating the name field in widget queries, but two LINE chart widgets (metrics-throughput-line and metrics-duration-line) were missed. Their queries[0].name fields remain empty strings (lines 189 and 220), and their title fields use hardcoded strings instead of the new constants (lines 182 and 212). This means these charts won't display legends in tooltips like the other updated widgets.
static/app/views/dashboards/utils/prebuiltConfigs/queries/querySummary.ts#L181-L238
sentry/static/app/views/dashboards/utils/prebuiltConfigs/queries/querySummary.ts
Lines 181 to 238 in 17593e1
| id: 'metrics-throughput-line', | |
| title: 'Queries Per Minute', | |
| description: '', | |
| displayType: DisplayType.LINE, | |
| thresholds: null, | |
| interval: '1h', | |
| queries: [ | |
| { | |
| name: '', | |
| fields: ['epm()'], | |
| aggregates: ['epm()'], | |
| columns: [], | |
| fieldAliases: [], | |
| conditions: '', | |
| orderby: 'epm()', | |
| onDemand: [], | |
| isHidden: false, | |
| linkedDashboards: [], | |
| }, | |
| ], | |
| widgetType: WidgetType.SPANS, | |
| layout: { | |
| x: 0, | |
| minH: 2, | |
| w: 3, | |
| h: 2, | |
| y: 3, | |
| }, | |
| }, | |
| { | |
| id: 'metrics-duration-line', | |
| title: 'Average Duration', | |
| description: '', | |
| displayType: DisplayType.LINE, | |
| widgetType: WidgetType.SPANS, | |
| thresholds: null, | |
| interval: '1h', | |
| queries: [ | |
| { | |
| name: '', | |
| fields: [`avg(${SpanFields.SPAN_SELF_TIME})`], | |
| aggregates: [`avg(${SpanFields.SPAN_SELF_TIME})`], | |
| columns: [], | |
| fieldAliases: [], | |
| conditions: '', | |
| orderby: `avg(${SpanFields.SPAN_SELF_TIME})`, | |
| onDemand: [], | |
| isHidden: false, | |
| }, | |
| ], | |
| layout: { | |
| x: 3, | |
| minH: 2, | |
| w: 3, | |
| h: 2, | |
| y: 3, | |
| }, | |
| }, |
This PR ensure tooltips have a legend, this way it more closely resembles the current insight page
