panel.ts 729 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { LoadingState, TimeSeries, TimeRange } from './series';
  2. export interface PanelProps<T = any> {
  3. timeSeries: TimeSeries[];
  4. timeRange: TimeRange;
  5. loading: LoadingState;
  6. options: T;
  7. renderCounter: number;
  8. width: number;
  9. height: number;
  10. }
  11. export interface PanelOptionsProps<T = any> {
  12. options: T;
  13. onChange: (options: T) => void;
  14. }
  15. export interface PanelSize {
  16. width: number;
  17. height: number;
  18. }
  19. export interface PanelMenuItem {
  20. type?: 'submenu' | 'divider';
  21. text?: string;
  22. iconClassName?: string;
  23. onClick?: () => void;
  24. shortcut?: string;
  25. subMenu?: PanelMenuItem[];
  26. }
  27. export interface Threshold {
  28. index: number;
  29. label: string;
  30. value: number;
  31. color?: string;
  32. canRemove: boolean;
  33. }