Skip to content

Commit 2e98879

Browse files
committed
Review fixes
1 parent 56bed16 commit 2e98879

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/components/charts/shared/statisticalOverlays.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,17 @@ function buildPrecomputed(
201201

202202
if (groupByField) {
203203
// Group-aware boundary duplication: collect points per group, find
204-
// segment transitions within each group, then emit all points in
205-
// original order with bridge points inserted at the right positions.
204+
// segment transitions within each group, then append bridge points
205+
// after the tagged data. Ordering within groups is handled by the
206+
// downstream pipeline which sorts by x-accessor per group.
206207
const groups = new Map<string, Record<string, any>[]>()
207208
for (const d of tagged) {
208209
const key = d[groupByField] ?? "__default"
209210
if (!groups.has(key)) groups.set(key, [])
210211
groups.get(key)!.push(d)
211212
}
212213

213-
// For each group, find segment boundaries and collect bridge points
214-
// keyed by their position in the original tagged array (insert-after index).
214+
// For each group, find segment boundaries and collect bridge points.
215215
const bridgePoints: Record<string, any>[] = []
216216
for (const [, groupPoints] of groups) {
217217
for (let j = 0; j < groupPoints.length - 1; j++) {

src/components/stream/StreamGeoFrame.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -684,20 +684,22 @@ const StreamGeoFrame = forwardRef<StreamGeoFrameHandle, StreamGeoFrameProps>(
684684

685685
if (hoveredNode && hoveredNode.type === "point") {
686686
const pn = hoveredNode as PointSceneNode
687-
const nodeColor = resolveNodeColor(hoveredNode)
687+
// Respect hoverAnnotation.pointColor for consistency with XY frame
688+
const hoverConfig = typeof hoverAnnotation === "object" ? hoverAnnotation : undefined
689+
const pointColor = hoverConfig?.pointColor || resolveNodeColor(hoveredNode)
688690
ictx.beginPath()
689691
ictx.arc(pn.x, pn.y, pn.r + 3, 0, Math.PI * 2)
690-
if (nodeColor) {
692+
if (pointColor) {
691693
ictx.save()
692694
ictx.globalAlpha = 0.4
693-
ictx.fillStyle = nodeColor
695+
ictx.fillStyle = pointColor
694696
ictx.fill()
695697
ictx.restore()
696698
} else {
697699
ictx.fillStyle = "rgba(255, 255, 255, 0.4)"
698700
ictx.fill()
699701
}
700-
ictx.strokeStyle = nodeColor || "rgba(0, 0, 0, 0.5)"
702+
ictx.strokeStyle = pointColor || "rgba(0, 0, 0, 0.5)"
701703
ictx.lineWidth = 2
702704
ictx.stroke()
703705
}

0 commit comments

Comments
 (0)