3f7fb60e0c33d4f664468e91a65dcd470661706764d7d57c8962a3aad024e028a786459263f2cd20fea6e288eb2e8ad2d1ab6c1716810a1d60a565387ee26b 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import SeriesModel from '../../model/Series.js';
  2. import { SeriesOption, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin, ScaleDataValue, DefaultStatesMixin, StatesMixinBase } from '../../util/types.js';
  3. import GlobalModel from '../../model/Global.js';
  4. import SeriesData from '../../data/SeriesData.js';
  5. export interface BaseBarSeriesOption<StateOption, ExtraStateOption extends StatesMixinBase = DefaultStatesMixin> extends SeriesOption<StateOption, ExtraStateOption>, SeriesOnCartesianOptionMixin, SeriesOnPolarOptionMixin {
  6. /**
  7. * Min height of bar
  8. */
  9. barMinHeight?: number;
  10. /**
  11. * Min angle of bar. Avaiable on polar coordinate system
  12. */
  13. barMinAngle?: number;
  14. /**
  15. * Max width of bar. Default to be 1 on cartesian coordinate system. Otherwise it's null
  16. */
  17. barMaxWidth?: number;
  18. barMinWidth?: number;
  19. /**
  20. * Bar width. Will be calculated automatically.
  21. * Can be pixel width or percent string.
  22. */
  23. barWidth?: number | string;
  24. /**
  25. * Gap between each bar inside category. Default to be 30%. Can be an aboslute pixel value
  26. */
  27. barGap?: string | number;
  28. /**
  29. * Gap between each category. Default to be 20%. can be an absolute pixel value.
  30. */
  31. barCategoryGap?: string | number;
  32. large?: boolean;
  33. largeThreshold?: number;
  34. }
  35. declare class BaseBarSeriesModel<Opts extends BaseBarSeriesOption<unknown> = BaseBarSeriesOption<unknown>> extends SeriesModel<Opts> {
  36. static type: string;
  37. type: string;
  38. getInitialData(option: Opts, ecModel: GlobalModel): SeriesData;
  39. getMarkerPosition(value: ScaleDataValue[]): number[];
  40. static defaultOption: BaseBarSeriesOption<unknown, unknown>;
  41. }
  42. export default BaseBarSeriesModel;