Skip to content

Commit

Permalink
Fix steps
Browse files Browse the repository at this point in the history
  • Loading branch information
philipjames44 committed Mar 18, 2024
1 parent 742da28 commit 88e830d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/charts/depthChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const DepthChart = ({ buySideData, sellSideData, asset1Token, asset2Token }: Dep
const chartRef = useRef<any>();

console.log(buySideData, sellSideData, midMarketPrice);
const data = {
const data: any = {
datasets: [
{
label: "Sell",
Expand All @@ -51,7 +51,7 @@ const DepthChart = ({ buySideData, sellSideData, asset1Token, asset2Token }: Dep
borderColor: "rgba(255, 73, 108, 0.6)", // Neon Red
backgroundColor: "rgba(255, 73, 108, 0.6)",
fill: "origin",
stepped: true,
stepped: "before",
yAxisID: "left-y",
},
{
Expand All @@ -62,7 +62,8 @@ const DepthChart = ({ buySideData, sellSideData, asset1Token, asset2Token }: Dep
borderColor: "rgba(51, 255, 87, 0.6)", // Neon Green
backgroundColor: "rgba(51, 255, 87, 0.6)",
fill: "origin",
stepped: true,
// horizontal lines on buy side need to start at point on right and continue to the left
stepped: "after",
yAxisID: "right-y",
},
],
Expand Down

0 comments on commit 88e830d

Please sign in to comment.