@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
55 lines (54 loc) • 2.3 kB
TypeScript
import { StatusSwitch, ChartType } from '../../../../../constants/chart-style';
import { ELabelValueType } from '../../../../../constants/map-style';
import OneDLegend, { IOneDLegend } from '../../components/one-d-legend';
import OneDChartStyleService, { IOneDChartStyle } from '../one-d';
import ILegendChartStyleService from '../legend';
export interface IMapChartStyle extends IOneDChartStyle {
legend: IOneDLegend;
showCalculable: boolean;
showVisualMap: boolean;
dataDetailsValue: StatusSwitch;
labelLayoutType: boolean;
labelValueType: ELabelValueType[];
}
export default abstract class MapChartStyleService extends OneDChartStyleService<IMapChartStyle> implements ILegendChartStyleService<OneDLegend> {
abstract chartType: ChartType;
legend: OneDLegend;
showCalculable: boolean;
showVisualMap: boolean;
dataDetailsValue: StatusSwitch;
labelLayoutType: boolean;
labelValueType: ELabelValueType[];
getOptions(): {
legend: IOneDLegend;
showCalculable: boolean;
showVisualMap: boolean;
dataDetailsValue: StatusSwitch;
labelLayoutType: boolean;
labelValueType: ELabelValueType[];
chartType: ChartType;
currentBuckets: string[];
currentMetrics: string[];
unit: string[];
precision: number;
displayColors?: import("../base").IColor[] | undefined;
};
setShowVisualMap(showVisualMap: boolean): void;
setShowCalculable(showCalculable: boolean): void;
setLabelLayoutType(labelLayoutType: boolean): void;
setLabelValueType(labelValueType: ELabelValueType[]): void;
/**
* 批量修改styleOption装饰过的值
* WARNING: 在父级类中使用请注意,此赋值方法也会识别到子类中styleOption装饰的
* @param obj 赋值操作的map映射
* @param allowNil 对obj中的nil值是否进行赋值操作
*/
set(obj: Partial<IMapChartStyle>, allowNil?: boolean): void;
/**
* 单独修改某个styleOption装饰过的值
* @param key 被装饰过的值的名称,如果名称不存在,或者未被装饰则函数调用无效
* @param value 值
*/
set<K extends keyof IMapChartStyle>(key: K, value: IMapChartStyle[K]): void;
constructor(chart: IMapChartStyle);
}