index.d.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import echarts from 'echarts';
  2. interface WordCloudTextStyle {
  3. color?: string;
  4. fontStyle?: string;
  5. fontWeight?: string | number;
  6. fontFamily?: string;
  7. fontSize?: number | string;
  8. align?: string;
  9. verticalAlign?: string;
  10. // @deprecated
  11. baseline?: string;
  12. opacity?: number;
  13. lineHeight?: number;
  14. backgroundColor?:
  15. | string
  16. | {
  17. image: HTMLImageElement | HTMLCanvasElement | string;
  18. };
  19. borderColor?: string;
  20. borderWidth?: number;
  21. borderType?: string;
  22. borderDashOffset?: number;
  23. borderRadius?: number | number[];
  24. padding?: number | number[];
  25. width?: number | string; // Percent
  26. height?: number;
  27. textBorderColor?: string;
  28. textBorderWidth?: number;
  29. textBorderType?: string;
  30. textBorderDashOffset?: number;
  31. textShadowBlur?: number;
  32. textShadowColor?: string;
  33. textShadowOffsetX?: number;
  34. textShadowOffsetY?: number;
  35. }
  36. interface WorldCloudDataItem {
  37. name?: string;
  38. value?: number | number[];
  39. textStyle?: WordCloudTextStyle;
  40. emphasis?: {
  41. textStyle?: WordCloudTextStyle;
  42. };
  43. }
  44. declare module 'echarts/types/dist/echarts' {
  45. export interface WordCloudSeriesOption {
  46. mainType?: 'series';
  47. type?: 'wordCloud';
  48. silent?: boolean;
  49. blendMode?: string;
  50. /**
  51. * Cursor when mouse on the elements
  52. */
  53. cursor?: string;
  54. width?: number | string;
  55. height?: number | string;
  56. top?: number | string;
  57. right?: number | string;
  58. bottom?: number | string;
  59. left?: number | string;
  60. textStyle?:
  61. | WordCloudTextStyle
  62. | {
  63. color?: (params?: any) => string;
  64. };
  65. emphasis?: {
  66. focus?: 'self' | 'series' | 'none';
  67. blurScope?: 'coordinateSystem' | 'global' | 'series';
  68. textStyle?: WordCloudTextStyle;
  69. };
  70. shape?: string;
  71. maskImage?: HTMLImageElement | HTMLCanvasElement;
  72. sizeRange?: number[];
  73. rotationRange?: number[];
  74. rotationStep?: number;
  75. gridSize?: number;
  76. drawOutOfBound?: boolean;
  77. layoutAnimation?: boolean;
  78. data?: WorldCloudDataItem[];
  79. }
  80. interface RegisteredSeriesOption {
  81. wordCloud: WordCloudSeriesOption;
  82. }
  83. }