Skip to content

Commit

Permalink
fix: fix sparkline highlightLine display problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Dec 20, 2023
1 parent 1ea80e7 commit 72c1cc4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/vtable/src/state/spark-line/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,21 @@ export function updateChartHover(col: number, row: number, x: number, y: number,
const highlightLine = sparkline.getChildByName('highlight-line');
if (highlightLine) {
highlightLine.setAttributes({
x: pointX,
// x: pointX,
points: [
{ x: pointX, y: max },
{ x: pointX, y: min }
],
visible: true,
pickable: true
});
} else {
const highlightLine = createLine({
x: pointX,
y: 0,
// x: 0,
// y: 0,
points: [
{ x: 0, y: max },
{ x: 0, y: min }
{ x: pointX, y: max },
{ x: pointX, y: min }
],
lineWidth: line.hover?.strokeWidth,
stroke: line.hover?.stroke
Expand Down

0 comments on commit 72c1cc4

Please sign in to comment.