Skip to content

Commit

Permalink
fix: remove some chart props
Browse files Browse the repository at this point in the history
  • Loading branch information
mikasackermn committed Sep 9, 2024
1 parent e656b3b commit a5f7cab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
13 changes: 0 additions & 13 deletions components/statistics/ChartBarBox/ChartBarBox.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@ import { DailySummaryType } from 'types';
import type { BarStackDataType, ColorBucketMapType } from '@rango-dev/charts';
import { ChartType } from './ChartBarBox.type';

export const bottomAxisConfig = {
mobile: {
7: { numBottomAxis: 3, startBottomAxis: 1, intervalBottomAxis: 2 },
30: { numBottomAxis: 3, startBottomAxis: 3, intervalBottomAxis: 10 },
90: { numBottomAxis: 3, startBottomAxis: 10, intervalBottomAxis: 30 },
},
desktop: {
7: { numBottomAxis: 7, startBottomAxis: 0, intervalBottomAxis: 1 },
30: { numBottomAxis: 6, startBottomAxis: 4, intervalBottomAxis: 5 },
90: { numBottomAxis: 8, startBottomAxis: 5, intervalBottomAxis: 10 },
},
};

export const BAR_CHART_BLOCKCHAIN_NUMBER = 10;

export const barChartColors: string[] = [
Expand Down
8 changes: 1 addition & 7 deletions components/statistics/ChartBarBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { getDailySummary } from 'services';
import { Select } from 'components/common/Select';
import { OptionType } from 'components/common/Select/Select.types';
import { bottomAxisConfig, prepareBarChartData } from './ChartBarBox.helper';
import { prepareBarChartData } from './ChartBarBox.helper';
import { ActiveFilterIcon, FilterIcon, LoadingIcon } from 'components/icons';
import ModalFilter from './ModalFilter';
import ParentSize from '@visx/responsive/lib/components/ParentSize';
Expand Down Expand Up @@ -222,10 +222,7 @@ function ChartBarBox(props: PropsType) {
height={height}
data={chartData}
buckets={buckets}
bottomAxisConfig={bottomAxisConfig}
colorBucketMap={colorBlockchainMap}
paddingInner={days === 7 ? 0.3 : 0.46}
paddingOuter={days === 90 ? 1 : 0.3}
getLabel={(value) =>
type === 'volume' ? `$${value}` : value
}
Expand Down Expand Up @@ -269,11 +266,8 @@ function ChartBarBox(props: PropsType) {
width={width}
height={height}
data={chartData}
bottomAxisConfig={bottomAxisConfig}
buckets={buckets}
colorBucketMap={colorBlockchainMap}
paddingInner={days === 7 ? 0.3 : 0.46}
paddingOuter={days === 90 ? 1 : 0.3}
getLabel={(value) =>
type === 'volume' ? `$ ${value}` : value
}
Expand Down

0 comments on commit a5f7cab

Please sign in to comment.