20f7580ea8caddb5e6aee7c6c71334ec46f81147fae255e551927118d9eeb6e2d3f6d7ba510cbceff55dab563f64e22ab8fb082af677d5487cdd5b084bc2ed 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * Single coordinates system.
  3. */
  4. import SingleAxis from './SingleAxis.js';
  5. import { CoordinateSystem, CoordinateSystemMaster } from '../CoordinateSystem.js';
  6. import GlobalModel from '../../model/Global.js';
  7. import ExtensionAPI from '../../core/ExtensionAPI.js';
  8. import BoundingRect from 'zrender/lib/core/BoundingRect.js';
  9. import SingleAxisModel from './AxisModel.js';
  10. import { ParsedModelFinder } from '../../util/model.js';
  11. import { ScaleDataValue } from '../../util/types.js';
  12. export declare const singleDimensions: string[];
  13. /**
  14. * Create a single coordinates system.
  15. */
  16. declare class Single implements CoordinateSystem, CoordinateSystemMaster {
  17. readonly type = "single";
  18. readonly dimension = "single";
  19. /**
  20. * Add it just for draw tooltip.
  21. */
  22. readonly dimensions: string[];
  23. name: string;
  24. axisPointerEnabled: boolean;
  25. model: SingleAxisModel;
  26. private _axis;
  27. private _rect;
  28. constructor(axisModel: SingleAxisModel, ecModel: GlobalModel, api: ExtensionAPI);
  29. /**
  30. * Initialize single coordinate system.
  31. */
  32. _init(axisModel: SingleAxisModel, ecModel: GlobalModel, api: ExtensionAPI): void;
  33. /**
  34. * Update axis scale after data processed
  35. */
  36. update(ecModel: GlobalModel, api: ExtensionAPI): void;
  37. /**
  38. * Resize the single coordinate system.
  39. */
  40. resize(axisModel: SingleAxisModel, api: ExtensionAPI): void;
  41. getRect(): BoundingRect;
  42. private _adjustAxis;
  43. private _updateAxisTransform;
  44. /**
  45. * Get axis.
  46. */
  47. getAxis(): SingleAxis;
  48. /**
  49. * Get axis, add it just for draw tooltip.
  50. */
  51. getBaseAxis(): SingleAxis;
  52. getAxes(): SingleAxis[];
  53. getTooltipAxes(): {
  54. baseAxes: SingleAxis[];
  55. otherAxes: SingleAxis[];
  56. };
  57. /**
  58. * If contain point.
  59. */
  60. containPoint(point: number[]): boolean;
  61. pointToData(point: number[]): number[];
  62. /**
  63. * Convert the series data to concrete point.
  64. * Can be [val] | val
  65. */
  66. dataToPoint(val: ScaleDataValue | ScaleDataValue[]): number[];
  67. convertToPixel(ecModel: GlobalModel, finder: ParsedModelFinder, value: ScaleDataValue[]): number[];
  68. convertFromPixel(ecModel: GlobalModel, finder: ParsedModelFinder, pixel: number[]): number[];
  69. }
  70. export default Single;