69793df46f402dfd2bee3a0d598c0df4d74e338ab2272021b3703a47b5b639cb044429d0696dbbe44ebe24de7b637e1f8de43bfd1fa02a2711cafe02a16097 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { ZRStyleProps } from './types.js';
  2. import { ElementTextConfig } from 'zrender/lib/Element.js';
  3. import { TextStyleProps, TextProps } from 'zrender/lib/graphic/Text.js';
  4. import { ItemStyleProps } from '../model/mixin/itemStyle.js';
  5. export interface LegacyStyleProps {
  6. legacy?: boolean;
  7. }
  8. /**
  9. * Whether need to call `convertEC4CompatibleStyle`.
  10. */
  11. export declare function isEC4CompatibleStyle(style: ZRStyleProps & LegacyStyleProps, elType: string, hasOwnTextContentOption: boolean, hasOwnTextConfig: boolean): boolean;
  12. /**
  13. * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.
  14. * @param hostStyle The properties might be modified.
  15. * @return If be text el, `textContentStyle` and `textConfig` will not be retured.
  16. * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area
  17. * retried from the `hostStyle`.
  18. */
  19. export declare function convertFromEC4CompatibleStyle(hostStyle: ZRStyleProps, elType: string, isNormal: boolean): {
  20. textContent: TextProps & {
  21. type: string;
  22. };
  23. textConfig: ElementTextConfig;
  24. };
  25. /**
  26. * Convert to pure echarts4 format style.
  27. * `itemStyle` will be modified, added with ec4 style properties from
  28. * `textStyle` and `textConfig`.
  29. *
  30. * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where
  31. * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.
  32. */
  33. export declare function convertToEC4StyleForCustomSerise(itemStl: ItemStyleProps, txStl: TextStyleProps, txCfg: ElementTextConfig): ZRStyleProps;
  34. export declare function warnDeprecated(deprecated: string, insteadApproach: string): void;