diff --git a/src/pages/ContentScripts/features/repo-fork-tooltip/ForkChart.tsx b/src/pages/ContentScripts/features/repo-fork-tooltip/ForkChart.tsx index 2f178afe..fa38d59a 100644 --- a/src/pages/ContentScripts/features/repo-fork-tooltip/ForkChart.tsx +++ b/src/pages/ContentScripts/features/repo-fork-tooltip/ForkChart.tsx @@ -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); diff --git a/src/pages/ContentScripts/features/repo-issue-tooltip/IssueChart.tsx b/src/pages/ContentScripts/features/repo-issue-tooltip/IssueChart.tsx index 0b67349a..4eb4b953 100644 --- a/src/pages/ContentScripts/features/repo-issue-tooltip/IssueChart.tsx +++ b/src/pages/ContentScripts/features/repo-issue-tooltip/IssueChart.tsx @@ -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); diff --git a/src/pages/ContentScripts/features/repo-pr-tooltip/MergedLinesChart.tsx b/src/pages/ContentScripts/features/repo-pr-tooltip/MergedLinesChart.tsx index 521607b1..6a388c71 100644 --- a/src/pages/ContentScripts/features/repo-pr-tooltip/MergedLinesChart.tsx +++ b/src/pages/ContentScripts/features/repo-pr-tooltip/MergedLinesChart.tsx @@ -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); diff --git a/src/pages/ContentScripts/features/repo-pr-tooltip/PRChart.tsx b/src/pages/ContentScripts/features/repo-pr-tooltip/PRChart.tsx index e5f12780..d88f46b3 100644 --- a/src/pages/ContentScripts/features/repo-pr-tooltip/PRChart.tsx +++ b/src/pages/ContentScripts/features/repo-pr-tooltip/PRChart.tsx @@ -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); diff --git a/src/pages/ContentScripts/features/repo-star-tooltip/StarChart.tsx b/src/pages/ContentScripts/features/repo-star-tooltip/StarChart.tsx index a038fa39..d5e549d5 100644 --- a/src/pages/ContentScripts/features/repo-star-tooltip/StarChart.tsx +++ b/src/pages/ContentScripts/features/repo-star-tooltip/StarChart.tsx @@ -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);