Skip to content

Commit

Permalink
plot tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xvvvyz committed Sep 21, 2024
1 parent 24691e4 commit 6166144
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions app/_components/insight-plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const InsightPlot = ({
fill: 'hsla(5, 85%, 50%, 100%)',
frameAnchor: 'top',
r: 4,
title: (d) => JSON.stringify({ Id: d.Id }),
title: (d) => JSON.stringify({ Id: d.Id, Time: d.Time }),
x,
}),
),
Expand Down Expand Up @@ -247,7 +247,7 @@ const InsightPlot = ({
marks.push(
P.dot(rows, {
fill: '#fff',
fillOpacity: 0.5,
fillOpacity: 0.7,
x,
y,
}),
Expand All @@ -271,14 +271,26 @@ const InsightPlot = ({
P.ruleX(
rows,
P.pointerX({
maxRadius: 500,
stroke: '#fff',
strokeOpacity: 0.25,
title: (d) => JSON.stringify({ Time: d.Time }),
x,
}),
),
);

if (isInputNominal) {
marks.push(
P.ruleY(
rows,
P.pointerY({
stroke: '#fff',
strokeOpacity: 0.25,
y,
}),
),
);
}
}

if (syncDate) {
Expand Down

0 comments on commit 6166144

Please sign in to comment.