c3059719928b7718d7075b555f943b4d3d22dabac8d2bf86595aff20bd5a6591bb20ed0b757c16464603e7377ff8e44c30f02a1bed4d2c15ee48dabd32d94c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import VisualMapModel, { VisualMapOption } from './VisualMapModel.js';
  2. import { ItemStyleOption } from '../../util/types.js';
  3. declare type VisualState = VisualMapModel['stateList'][number];
  4. export interface ContinousVisualMapOption extends VisualMapOption {
  5. align?: 'auto' | 'left' | 'right' | 'top' | 'bottom';
  6. /**
  7. * This prop effect default component type determine
  8. * @see echarts/component/visualMap/typeDefaulter.
  9. */
  10. calculable?: boolean;
  11. /**
  12. * selected range. In default case `range` is [min, max]
  13. * and can auto change along with modification of min max,
  14. * util user specifid a range.
  15. */
  16. range?: number[];
  17. /**
  18. * Whether to enable hover highlight.
  19. */
  20. hoverLink?: boolean;
  21. /**
  22. * The extent of hovered data.
  23. */
  24. hoverLinkDataSize?: number;
  25. /**
  26. * Whether trigger hoverLink when hover handle.
  27. * If not specified, follow the value of `realtime`.
  28. */
  29. hoverLinkOnHandle?: boolean;
  30. handleIcon?: string;
  31. handleSize?: string | number;
  32. handleStyle?: ItemStyleOption;
  33. indicatorIcon?: string;
  34. indicatorSize?: string | number;
  35. indicatorStyle?: ItemStyleOption;
  36. emphasis?: {
  37. handleStyle?: ItemStyleOption;
  38. };
  39. }
  40. declare class ContinuousModel extends VisualMapModel<ContinousVisualMapOption> {
  41. static type: "visualMap.continuous";
  42. type: "visualMap.continuous";
  43. /**
  44. * @override
  45. */
  46. optionUpdated(newOption: ContinousVisualMapOption, isInit: boolean): void;
  47. /**
  48. * @protected
  49. * @override
  50. */
  51. resetItemSize(): void;
  52. /**
  53. * @private
  54. */
  55. _resetRange(): void;
  56. /**
  57. * @protected
  58. * @override
  59. */
  60. completeVisualOption(): void;
  61. /**
  62. * @override
  63. */
  64. setSelected(selected: number[]): void;
  65. /**
  66. * @public
  67. */
  68. getSelected(): [number, number];
  69. /**
  70. * @override
  71. */
  72. getValueState(value: number): VisualState;
  73. findTargetDataIndices(range: number[]): {
  74. seriesId: string;
  75. dataIndex: number[];
  76. }[];
  77. /**
  78. * @implement
  79. */
  80. getVisualMeta(getColorVisual: (value: number, valueState: VisualState) => string): {
  81. stops: {
  82. value: number;
  83. color: string;
  84. }[];
  85. outerColors: string[];
  86. };
  87. static defaultOption: ContinousVisualMapOption;
  88. }
  89. export default ContinuousModel;