Function
getScale
(
value: number,
min: number,
max: number,
size: number,
)
Source from the content-addressed store, hash-verified
| 159 | }; |
| 160 | |
| 161 | export const getScale = ( |
| 162 | value: number, |
| 163 | min: number, |
| 164 | max: number, |
| 165 | size: number, |
| 166 | ) => |
| 167 | min == max |
| 168 | ? size / 2 |
| 169 | : mathRound(((size * (value - min)) / (max - min)) * 1000000) / 1000000; |
| 170 | |
| 171 | export const getBounds = (kind: Kind, points: DataPoint[]): Bounds => { |
| 172 | if (arrayIsEmpty(points)) { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…