@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
102 lines (101 loc) • 3.6 kB
TypeScript
import { ChartType, AxisNameMode, LabelShowMode, LabelRotation, AxisType, YEmptyValueMode, StatusSwitch, ESizeType } from '../../../../../constants/chart-style';
import { IChartStyleInitOption } from '../base';
import TwoDChartStyleService, { ITwoDChartStyle } from '../two-d';
export interface IBubbleChartStyle extends ITwoDChartStyle {
minSize: number;
maxSize: number;
threshold: number;
showZero: StatusSwitch;
sizeType: ESizeType;
sizeField: string[];
unit: string[];
precision: number;
minDiameter?: number;
maxDiameter?: number;
}
export default abstract class BubbleChartStyleService extends TwoDChartStyleService<IBubbleChartStyle> {
static getChartInitStyle: typeof getChartInitStyle;
chartType: ChartType;
minSize: number;
minDiameter?: number;
maxSize: number;
maxDiameter?: number;
threshold: number;
showZero: StatusSwitch;
sizeType: ESizeType;
sizeField: string[];
unit: string[];
precision: number;
get unitTransformer(): (value: any) => any;
getOptions(): {
minSize: number;
maxSize: number;
minDiameter: number | undefined;
maxDiameter: number | undefined;
threshold: number;
showZero: StatusSwitch;
sizeType: ESizeType;
sizeField: string[];
unit: string[];
precision: number;
chartType: ChartType;
mainAxis: import("../..").IMainAxis;
crossAxis1: import("../..").ICrossAxis;
crossAxis2: import("../..").ICrossAxis2;
legend: import("../../components/two-d-legend").ITwoDLegend;
colors: import("../..").IColors;
colorMode: import("@qn-pandora/pandora-app-component").EColorMode;
compare: import("../../components/compare").ICompare;
baseLine: import("@qn-pandora/pandora-app-component/lib/components/BaseLineItem/constants").IBaseLine<any>[];
showToolBox: boolean;
tooltipType: import("../../../../../constants/chart-style").ETooltipType;
tooltipAppendToBody?: boolean | undefined;
markLine?: import("../../../../../constants/chart-style").IMarkLineType | undefined;
displayColors?: import("../base").IColor[] | undefined;
};
setPrecision(precision: number): void;
setMinSize(minSize: number): void;
setMaxSize(maxSize: number): void;
setMinDiameter(minDiameter: number): void;
setMaxDiameter(maxDiameter: number): void;
setThreshold(threshold: number): void;
setSizeField(sizeField: string[]): void;
setSizeType(sizeType: ESizeType): void;
setShowZero(showZero: StatusSwitch): void;
setUnit(unit: string[]): void;
constructor(option: IBubbleChartStyle);
}
export declare function getChartInitStyle(option: IChartStyleInitOption, initFirst?: boolean): {
fields: import("@qn-pandora/app-sdk").IChartField[];
buckets: string[];
metrics: string[];
minSize: number;
maxSize: number;
minDiameter: undefined;
maxDiameter: undefined;
sizeType: ESizeType;
threshold: number;
showZero: StatusSwitch;
sizeField: string[];
unit: string[];
precision: number;
colors: {
fields: string[];
};
mainAxis: {
name: string;
nameMode: AxisNameMode;
labelShowMode: LabelShowMode;
labelRotation: LabelRotation;
field: string;
unit: string[];
precision: number;
};
crossAxis1: {
name: string;
nameMode: AxisNameMode;
fields: string[];
scale: AxisType;
yEmptyValueMode: YEmptyValueMode;
};
};