| 1306 | } |
| 1307 | |
| 1308 | export interface Scale<O extends CoreScaleOptions = CoreScaleOptions> extends Element<unknown, O>, LayoutItem { |
| 1309 | readonly id: string; |
| 1310 | readonly type: string; |
| 1311 | readonly ctx: CanvasRenderingContext2D; |
| 1312 | readonly chart: Chart; |
| 1313 | |
| 1314 | maxWidth: number; |
| 1315 | maxHeight: number; |
| 1316 | |
| 1317 | paddingTop: number; |
| 1318 | paddingBottom: number; |
| 1319 | paddingLeft: number; |
| 1320 | paddingRight: number; |
| 1321 | |
| 1322 | axis: string; |
| 1323 | labelRotation: number; |
| 1324 | min: number; |
| 1325 | max: number; |
| 1326 | ticks: Tick[]; |
| 1327 | getMatchingVisibleMetas(type?: string): ChartMeta[]; |
| 1328 | |
| 1329 | drawTitle(chartArea: ChartArea): void; |
| 1330 | drawLabels(chartArea: ChartArea): void; |
| 1331 | drawGrid(chartArea: ChartArea): void; |
| 1332 | |
| 1333 | /** |
| 1334 | * @param {number} pixel |
| 1335 | * @return {number} |
| 1336 | */ |
| 1337 | getDecimalForPixel(pixel: number): number; |
| 1338 | /** |
| 1339 | * Utility for getting the pixel location of a percentage of scale |
| 1340 | * The coordinate (0, 0) is at the upper-left corner of the canvas |
| 1341 | * @param {number} decimal |
| 1342 | * @return {number} |
| 1343 | */ |
| 1344 | getPixelForDecimal(decimal: number): number; |
| 1345 | /** |
| 1346 | * Returns the location of the tick at the given index |
| 1347 | * The coordinate (0, 0) is at the upper-left corner of the canvas |
| 1348 | * @param {number} index |
| 1349 | * @return {number} |
| 1350 | */ |
| 1351 | getPixelForTick(index: number): number; |
| 1352 | /** |
| 1353 | * Used to get the label to display in the tooltip for the given value |
| 1354 | * @param {*} value |
| 1355 | * @return {string} |
| 1356 | */ |
| 1357 | getLabelForValue(value: number): string; |
| 1358 | |
| 1359 | /** |
| 1360 | * Returns the grid line width at given value |
| 1361 | */ |
| 1362 | getLineWidthForValue(value: number): number; |
| 1363 | |
| 1364 | /** |
| 1365 | * Returns the location of the given data point. Value can either be an index or a numerical value |
no outgoing calls
no test coverage detected