cdb648f5ddf0fd18848ca75bae2db17ac360f9b2e2ed2e6ba448ceaf07ebc1cdd8d4800afe9b5fed799d5b15dbf2ea7fc5f020adc4d8f4baab2055fc036d72 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { ToolboxFeature, ToolboxFeatureOption } from '../featureManager.js';
  2. import { SeriesOption } from '../../../util/types.js';
  3. import GlobalModel from '../../../model/Global.js';
  4. import ExtensionAPI from '../../../core/ExtensionAPI.js';
  5. declare const ICON_TYPES: readonly ["line", "bar", "stack"];
  6. declare const TITLE_TYPES: readonly ["line", "bar", "stack", "tiled"];
  7. declare type IconType = typeof ICON_TYPES[number];
  8. declare type TitleType = typeof TITLE_TYPES[number];
  9. export interface ToolboxMagicTypeFeatureOption extends ToolboxFeatureOption {
  10. type?: IconType[];
  11. /**
  12. * Icon group
  13. */
  14. icon?: {
  15. [key in IconType]?: string;
  16. };
  17. title?: {
  18. [key in TitleType]?: string;
  19. };
  20. option?: {
  21. [key in IconType]?: SeriesOption;
  22. };
  23. /**
  24. * Map of seriesType: seriesIndex
  25. */
  26. seriesIndex?: {
  27. line?: number;
  28. bar?: number;
  29. };
  30. }
  31. declare class MagicType extends ToolboxFeature<ToolboxMagicTypeFeatureOption> {
  32. getIcons(): {
  33. line?: string;
  34. stack?: string;
  35. bar?: string;
  36. };
  37. static getDefaultOption(ecModel: GlobalModel): ToolboxMagicTypeFeatureOption;
  38. onclick(ecModel: GlobalModel, api: ExtensionAPI, type: IconType): void;
  39. }
  40. export default MagicType;