Skip to content

Commit

Permalink
Refactor left, right vars
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven committed Sep 18, 2024
1 parent b0a7aed commit c4dbf1d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/charts/ohlcChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,10 @@ const OHLCChart = ({ asset1Token, asset2Token }: OHLCChartProps) => {
setIsAggregating(false);
}, [timeAggregateSeconds, isOHLCDataLoading, isTimestampsLoading, blockToTimestamp, error]);

const left = 44;
const right = 8;
const options = {
width: width - 44 - 8,
width: width - left - right,
xAxis: [
{
type: 'category',
Expand Down Expand Up @@ -448,13 +450,13 @@ const OHLCChart = ({ asset1Token, asset2Token }: OHLCChartProps) => {
],
grid: [
{
left: 44,
right: 8,
left,
right,
height: '60%',
},
{
left: 44,
right: 8,
left,
right,
top: '74%',
height: '12%',
},
Expand Down

0 comments on commit c4dbf1d

Please sign in to comment.