Commit a5a22bb30967111284900fe744b1ce3b93cbbc2c
1 parent
1108ceb7
fix: DEFECT-719 data component chart fontsize calc way
Showing
1 changed file
with
1 additions
and
2 deletions
... | ... | @@ -25,7 +25,7 @@ export const calcScale = ( |
25 | 25 | width = width * (widthRadio / 100); |
26 | 26 | height = height * (heightRadio / 100); |
27 | 27 | |
28 | - const temp = width * height; | |
28 | + const temp = width > height ? height ** 2 : width ** 2; | |
29 | 29 | |
30 | 30 | const isLess = temp < 300 * 300; |
31 | 31 | |
... | ... | @@ -51,7 +51,6 @@ export const fontSize = ({ |
51 | 51 | min?: number; |
52 | 52 | }) => { |
53 | 53 | const { radio } = radioRecord; |
54 | - // console.log({ ...radioRecord }); | |
55 | 54 | let res = basic * radio; |
56 | 55 | if (max && res > max) res = max; |
57 | 56 | if (min && res < min) res = min; | ... | ... |