Skip to content

Commit

Permalink
style:further changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyantong2000 committed Apr 19, 2024
1 parent 7f03f3a commit 33955b6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ const ForkChart = (props: ForkChartProps): JSX.Element => {
xAxis: { minInterval?: any }[];
};
const startValue = params.batch[0].start;
const endValue = params.batch[0].end;
let minInterval: number;
if (startValue != 0) {
minInterval = 30 * 24 * 3600 * 1000;
} else {
if (startValue == 0 && endValue == 100) {
minInterval = 365 * 24 * 3600 * 1000;
} else {
minInterval = 30 * 24 * 3600 * 1000;
}
option.xAxis[0].minInterval = minInterval;
instance.setOption(option);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ const IssueChart = (props: IssueChartProps): JSX.Element => {
xAxis: { minInterval?: any }[];
};
const startValue = params.batch[0].start;
const endValue = params.batch[0].end;
let minInterval: number;
if (startValue != 0) {
minInterval = 30 * 24 * 3600 * 1000;
} else {
if (startValue == 0 && endValue == 100) {
minInterval = 365 * 24 * 3600 * 1000;
} else {
minInterval = 30 * 24 * 3600 * 1000;
}
option.xAxis[0].minInterval = minInterval;
instance.setOption(option);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,12 @@ const MergedLinesChart = (props: MergedLinesChartProps): JSX.Element => {
xAxis: { minInterval?: any }[];
};
const startValue = params.batch[0].start;
const endValue = params.batch[0].end;
let minInterval: number;
if (startValue != 0) {
minInterval = 30 * 24 * 3600 * 1000;
} else {
if (startValue == 0 && endValue == 100) {
minInterval = 365 * 24 * 3600 * 1000;
} else {
minInterval = 30 * 24 * 3600 * 1000;
}
option.xAxis[0].minInterval = minInterval;
instance.setOption(option);
Expand Down
7 changes: 4 additions & 3 deletions src/pages/ContentScripts/features/repo-pr-tooltip/PRChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ const PRChart = (props: PRChartProps): JSX.Element => {
xAxis: { minInterval?: any }[];
};
const startValue = params.batch[0].start;
const endValue = params.batch[0].end;
let minInterval: number;
if (startValue != 0) {
minInterval = 30 * 24 * 3600 * 1000;
} else {
if (startValue == 0 && endValue == 100) {
minInterval = 365 * 24 * 3600 * 1000;
} else {
minInterval = 30 * 24 * 3600 * 1000;
}
option.xAxis[0].minInterval = minInterval;
instance.setOption(option);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ const StarChart = (props: StarChartProps): JSX.Element => {
xAxis: { minInterval?: any }[];
};
const startValue = params.batch[0].start;
const endValue = params.batch[0].end;
let minInterval: number;
if (startValue != 0) {
minInterval = 30 * 24 * 3600 * 1000;
} else {
if (startValue == 0 && endValue == 100) {
minInterval = 365 * 24 * 3600 * 1000;
} else {
minInterval = 30 * 24 * 3600 * 1000;
}
option.xAxis[0].minInterval = minInterval;
instance.setOption(option);
Expand Down

0 comments on commit 33955b6

Please sign in to comment.