You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. export default TimeSeriesScale;
  2. declare class TimeSeriesScale extends TimeScale {
  3. /** @type {object[]} */
  4. _table: object[];
  5. /** @type {number} */
  6. _minPos: number;
  7. /** @type {number} */
  8. _tableRange: number;
  9. /**
  10. * @protected
  11. */
  12. protected initOffsets(): void;
  13. /**
  14. * Returns an array of {time, pos} objects used to interpolate a specific `time` or position
  15. * (`pos`) on the scale, by searching entries before and after the requested value. `pos` is
  16. * a decimal between 0 and 1: 0 being the start of the scale (left or top) and 1 the other
  17. * extremity (left + width or top + height). Note that it would be more optimized to directly
  18. * store pre-computed pixels, but the scale dimensions are not guaranteed at the time we need
  19. * to create the lookup table. The table ALWAYS contains at least two items: min and max.
  20. * @param {number[]} timestamps
  21. * @return {object[]}
  22. * @protected
  23. */
  24. protected buildLookupTable(timestamps: number[]): object[];
  25. /**
  26. * Returns all timestamps
  27. * @return {number[]}
  28. * @private
  29. */
  30. private _getTimestampsForTable;
  31. }
  32. import TimeScale from "./scale.time.js";