Skip to content

Commit 7e8f54d

Browse files
authored
chore: modify slider config (#55)
1 parent 1d8b3ae commit 7e8f54d

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

website/src/components/ContentBundleSize.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
BUNDLE_SIZE_DEFAULT_CASE,
66
LINE_CHART_DEFAULT_CONFIG,
77
BASE_PADDING,
8+
PRODUCT,
89
} from '@/shared/constant';
910
import { Filters, useFilterResult } from './Filters';
1011
import { useEffect, useRef } from 'react';
@@ -64,6 +65,10 @@ export const ContentBundleSize = (props: { productIndex: string }) => {
6465
value: `${datum.y} KB`,
6566
}),
6667
},
68+
slider: {
69+
start: productName === PRODUCT.MODERNJS_FRAMEWORK ? 0.85 : 0,
70+
end: 1,
71+
},
6772
});
6873

6974
chartInstance.current.render();

website/src/components/ContentCompileSpeed.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
COMPILE_SPEED_DEFAULT_CASE,
66
LINE_CHART_DEFAULT_CONFIG,
77
BASE_PADDING,
8+
PRODUCT,
89
} from '@/shared/constant';
910
import { Filters, useFilterResult } from './Filters';
1011
import { useEffect, useRef } from 'react';
@@ -64,6 +65,10 @@ export const ContentCompileSpeed = (props: { productIndex: string }) => {
6465
value: datum.y + 's',
6566
}),
6667
},
68+
slider: {
69+
start: productName === PRODUCT.MODERNJS_FRAMEWORK ? 0.85 : 0,
70+
end: 1,
71+
},
6772
});
6873

6974
chartInstance.current.render();

website/src/components/ContentInstallSpeed.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
INSTALL_SPEED_METRICS,
66
INSTALL_SPEED_DEFAULT_CASE,
77
LINE_CHART_DEFAULT_CONFIG,
8+
PRODUCT,
89
} from '@/shared/constant';
910
import { Filters, useFilterResult } from './Filters';
1011
import { useEffect, useRef } from 'react';
@@ -94,6 +95,10 @@ export const ContentInstallSpeed = (props: { productIndex: string }) => {
9495
};
9596
},
9697
},
98+
slider: {
99+
start: productName === PRODUCT.MODERNJS_FRAMEWORK ? 0.85 : 0,
100+
end: 1,
101+
},
97102
});
98103

99104
chartInstance.current.render();

website/src/shared/constant.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,4 @@ export const LINE_CHART_DEFAULT_CONFIG: Partial<LineOptions> = {
150150
size: 3,
151151
},
152152
stepType: 'vh',
153-
slider: {
154-
start: 0,
155-
end: 1,
156-
},
157153
};

0 commit comments

Comments
 (0)