extract xtick
This commit is contained in:
1 parent
e3075318b6
commit
58f1ae7fe9
6 files changed
+36
-65
No files matched your search
@@ -1,6 +0,0 @@
|
||||
export const computeYAxisCap = (values: number[]): number | undefined => {
|
||||
const sorted = values.slice().sort((a, b) => a - b);
|
||||
if (sorted.length < 2) return undefined;
|
||||
const p95 = sorted[Math.min(sorted.length - 1, Math.floor(sorted.length * 0.95))];
|
||||
return p95 > 0 ? Math.ceil(p95 * 2) : undefined;
|
||||
};
|
||||
Reference in new issue
Block a user