Skip to content

Commit

Permalink
feat: add rounding to day
Browse files Browse the repository at this point in the history
  • Loading branch information
toniocodo committed Sep 25, 2023
1 parent 70feee1 commit c0d9278
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/oeth/swap/src/components/ApyChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ export const ApyChart = (props: StackProps) => {
!isNilOrEmpty(tooltip?.['_active']) &&
!isNilOrEmpty(tooltip?.dataPoints?.[0]?.parsed?.x)
) {
const xCoor = x.getPixelForValue(
tooltip.dataPoints[0].parsed.x,
tooltip.dataPoints[0].dataIndex,
);
const xCoor = x.getPixelForValue(tooltip.dataPoints[0].parsed.x);

ctx.save();
ctx.beginPath();
Expand Down Expand Up @@ -165,6 +162,9 @@ export const ApyChart = (props: StackProps) => {
},
x: {
type: 'time',
time: {
round: 'day',
},
border: { display: false },
grid: {
display: false,
Expand Down

0 comments on commit c0d9278

Please sign in to comment.