| 59 | * `_d3TransformationScale` for more info. |
| 60 | */ |
| 61 | export interface ITransformableScale { |
| 62 | /** |
| 63 | * Apply the magnification with the floating point `magnifyAmount` centered |
| 64 | * at the `centerValue` coordinate. |
| 65 | * |
| 66 | * @param {number} [magnifyAmount] The floating point zoom amount. `1.0` is |
| 67 | * no zoom change. |
| 68 | * @param {number} [centerValue] The coordinate of the mouse in screen |
| 69 | * space. |
| 70 | */ |
| 71 | zoom(magnifyAmount: number, centerValue: number): void; |
| 72 | |
| 73 | /** |
| 74 | * Translates the scale by a number of pixels. |
| 75 | * |
| 76 | * @param {number} [translateAmount] The translation amount in screen space |
| 77 | */ |
| 78 | pan(translateAmount: number): void; |
| 79 | |
| 80 | /** |
| 81 | * Returns value in *screen space* for the given domain value. |
| 82 | */ |
| 83 | scaleTransformation(value: number): number; |
| 84 | |
| 85 | /** |
| 86 | * Gets the full extent of the transformation domain. |
| 87 | */ |
| 88 | getTransformationExtent(): [number, number]; |
| 89 | |
| 90 | /** |
| 91 | * Returns the current transformed domain of the scale. This must be a |
| 92 | * numerical range in the same coordinate space used for |
| 93 | * `scaleTransformation`. |
| 94 | */ |
| 95 | getTransformationDomain(): [number, number]; |
| 96 | |
| 97 | /** |
| 98 | * Directly set the transformation domain. Instead of calling `.zoom` or |
| 99 | * `.pan` perform calculations relative to the current domain, this can but |
| 100 | * used to pan/zoom to an exact domain interval (in transformation space). |
| 101 | */ |
| 102 | setTransformationDomain(domain: [number, number]): void; |
| 103 | |
| 104 | /** |
| 105 | * Returns value in *Transformation Space* for the provided *screen space*. |
| 106 | */ |
| 107 | invertedTransformation(value: number): number; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Type guarded function to check if the scale implements the |
no outgoing calls
no test coverage detected