Skip to content

Commit

Permalink
feat: Tweak error bar width and center the whisker central line
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Feb 16, 2022
1 parent 1e34744 commit c462d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/charts/column/columns-simple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const VerticalWhisker = memo(
stroke="none"
/>
<rect
x={x + width / 2}
x={x + width / 2 - 1}
y={y2}
width={2}
height={y1 - y2}
Expand Down Expand Up @@ -62,7 +62,7 @@ export const ErrorWhiskers = () => {
{preparedData.map((d, i) => {
const x0 = xScale(getX(d)) as number;
const bandwidth = xScale.bandwidth();
const barwidth = bandwidth / 4;
const barwidth = Math.min(bandwidth, 15);
const [y1, y2] = getYError(d);
return (
<VerticalWhisker
Expand Down

0 comments on commit c462d6c

Please sign in to comment.