Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ export function HeatMapWidgetVisualization(props: HeatMapWidgetVisualizationProp
<Flex direction="column" height="100%">
<BaseChart
autoHeightResize
// will be grouped by date as we only support time as the x-axis right now.
// this will change later and we'll pass in what kind of x-axis we have
isGroupedByDate
showTimeInTooltip
tooltip={{
show: false,
show: true,
axisPointer: {
show: false,
},
triggerOn: 'click',
Comment on lines 68 to +73
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The heatmap tooltip formatter is not customized for 3D data, causing it to display the Y-axis label instead of the Z-axis count as the series value.
Severity: MEDIUM

Suggested Fix

Provide a custom formatter function in the tooltip configuration for the heatmap chart. This formatter should correctly access the Z-axis value from the 3D series data at index 2 (e.g., params.value[2]) to display the correct count in the tooltip.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
static/app/views/dashboards/widgets/heatMapWidget/heatMapWidgetVisualization.tsx#L68-L73

Potential issue: The `tooltip` configuration for the heatmap chart in
`heatMapWidgetVisualization.tsx` lacks a custom `formatter`. Consequently, the default
formatter from `tooltip.tsx` is used, which is designed for 2D data and extracts the
value from index 1 of the series data (`getSeriesValue(serie, 1)`). For heatmap series,
which are 3D (`[xAxis, yAxis, zAxis]`), index 1 holds the Y-axis bucket label (e.g.,
'p95'), while the actual count is at index 2. This results in the tooltip incorrectly
displaying the Y-axis label as the metric value, misleading users about the data.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya ya later problem

}}
series={series}
xAxis={{
Expand Down
Loading