237c62ee645f2e7f5826ab9b34b6828e3e5e6bc417483676e0fb1360661c367a7f383e5d2f5be09be03f2e0579bf8e58a0d86441f6561cbc54f2657d042260 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. import Axis from '../Axis.js';
  2. import Scale from '../../scale/Scale.js';
  3. import { OptionAxisType } from '../axisCommonTypes.js';
  4. import SingleAxisModel, { SingleAxisPosition } from './AxisModel.js';
  5. import { LayoutOrient } from '../../util/types.js';
  6. import Single from './Single.js';
  7. interface SingleAxis {
  8. /**
  9. * Transform global coord to local coord,
  10. * i.e. let localCoord = axis.toLocalCoord(80);
  11. */
  12. toLocalCoord(coord: number): number;
  13. /**
  14. * Transform global coord to local coord,
  15. * i.e. let globalCoord = axis.toLocalCoord(40);
  16. */
  17. toGlobalCoord(coord: number): number;
  18. }
  19. declare class SingleAxis extends Axis {
  20. position: SingleAxisPosition;
  21. orient: LayoutOrient;
  22. coordinateSystem: Single;
  23. model: SingleAxisModel;
  24. constructor(dim: string, scale: Scale, coordExtent: [number, number], axisType?: OptionAxisType, position?: SingleAxisPosition);
  25. /**
  26. * Judge the orient of the axis.
  27. */
  28. isHorizontal(): boolean;
  29. pointToData(point: number[], clamp?: boolean): number;
  30. }
  31. export default SingleAxis;