a676a2d26e42ef824f18e78d5157e39c7381f8380f0860dbab1fea7e5b5e9ca593d0f32f8da8af7315f6e3fc0e143e35cf205ff92fd8b2e3511eb156fc4404 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { Payload } from '../../util/types.js';
  2. import GlobalModel from '../../model/Global.js';
  3. import DataZoomModel from './DataZoomModel.js';
  4. import { HashMap } from 'zrender/lib/core/util.js';
  5. import SeriesModel from '../../model/Series.js';
  6. import { CoordinateSystemHostModel } from '../../coord/CoordinateSystem.js';
  7. import { AxisBaseModel } from '../../coord/AxisBaseModel.js';
  8. export interface DataZoomPayloadBatchItem {
  9. dataZoomId: string;
  10. start?: number;
  11. end?: number;
  12. startValue?: number;
  13. endValue?: number;
  14. }
  15. export interface DataZoomReferCoordSysInfo {
  16. model: CoordinateSystemHostModel;
  17. axisModels: AxisBaseModel[];
  18. }
  19. export declare const DATA_ZOOM_AXIS_DIMENSIONS: readonly ["x", "y", "radius", "angle", "single"];
  20. export declare type DataZoomAxisDimension = 'x' | 'y' | 'radius' | 'angle' | 'single';
  21. declare type DataZoomAxisMainType = 'xAxis' | 'yAxis' | 'radiusAxis' | 'angleAxis' | 'singleAxis';
  22. declare type DataZoomAxisIndexPropName = 'xAxisIndex' | 'yAxisIndex' | 'radiusAxisIndex' | 'angleAxisIndex' | 'singleAxisIndex';
  23. declare type DataZoomAxisIdPropName = 'xAxisId' | 'yAxisId' | 'radiusAxisId' | 'angleAxisId' | 'singleAxisId';
  24. export declare type DataZoomCoordSysMainType = 'polar' | 'grid' | 'singleAxis';
  25. export declare function isCoordSupported(seriesModel: SeriesModel): boolean;
  26. export declare function getAxisMainType(axisDim: DataZoomAxisDimension): DataZoomAxisMainType;
  27. export declare function getAxisIndexPropName(axisDim: DataZoomAxisDimension): DataZoomAxisIndexPropName;
  28. export declare function getAxisIdPropName(axisDim: DataZoomAxisDimension): DataZoomAxisIdPropName;
  29. /**
  30. * If two dataZoomModels has the same axis controlled, we say that they are 'linked'.
  31. * This function finds all linked dataZoomModels start from the given payload.
  32. */
  33. export declare function findEffectedDataZooms(ecModel: GlobalModel, payload: Payload): DataZoomModel[];
  34. /**
  35. * Find the first target coordinate system.
  36. * Available after model built.
  37. *
  38. * @return Like {
  39. * grid: [
  40. * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},
  41. * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},
  42. * ...
  43. * ], // cartesians must not be null/undefined.
  44. * polar: [
  45. * {model: coord0, axisModels: [axis4], coordIndex: 0},
  46. * ...
  47. * ], // polars must not be null/undefined.
  48. * singleAxis: [
  49. * {model: coord0, axisModels: [], coordIndex: 0}
  50. * ]
  51. * }
  52. */
  53. export declare function collectReferCoordSysModelInfo(dataZoomModel: DataZoomModel): {
  54. infoList: DataZoomReferCoordSysInfo[];
  55. infoMap: HashMap<DataZoomReferCoordSysInfo, string>;
  56. };
  57. export {};