@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
111 lines (110 loc) • 2.85 kB
TypeScript
import { IChartField, TChartFieldDataItem } from '@qn-pandora/app-sdk';
export interface IBucket {
field: string;
type: string;
span?: string;
value: any;
}
export interface IMetric {
field: string;
value: number;
}
export interface IChartEventParams {
fields: IChartField[];
}
export interface ITwoDEventParams extends IChartEventParams {
mainAxisValue: any;
mainAxisField: string;
metricValue: any;
metricField: string;
groupFields: string[];
groupValues: any[];
}
export interface IOneDEventParams extends IChartEventParams {
mainAxisValue: any;
mainAxisField: string;
metricValue: any;
metricField: string;
}
export interface ITableEventParams extends IChartEventParams {
record: IKeyValues;
clickField: IChartField;
clickValue: any;
}
export interface ISingleEventParams extends IChartEventParams {
currentBuckets: IChartField[];
currentMetrics: IChartField[];
rows: TChartFieldDataItem[][];
currentData: any;
}
export interface IScatterEventParams extends IChartEventParams {
xField: string;
yField: string;
colorField: string;
xFieldValue: any;
yFieldValue: any;
colorFieldValue: any;
}
export interface IRelationEventParams extends IChartEventParams {
fromField: string;
toField: any;
fromFieldValue: string;
toFieldValue: any;
metricField: string;
metricValue: any;
}
export interface IStatusPanelEventParams extends IChartEventParams {
titles: string[];
contents: Array<{
label: string;
value: any;
}>;
currentBuckets: string[];
originRow: any[][];
}
export interface IMetricPanelEventParams extends IChartEventParams {
titles: string[];
contents: Array<{
label: string;
value: any;
prefix: string;
suffix: string;
}>;
currentBuckets: string[];
originRow: any[][];
}
export interface IRadarBucketEventParams extends IChartEventParams {
indicator: Array<{
name: string;
key: string;
}>;
}
export interface ISunburstEventParams extends IChartEventParams {
currentBuckets: string[];
currentMetrics: string[];
treePathInfo: Array<{
name: string;
value: string;
}>;
}
export interface IMapboxEventParams extends IChartEventParams {
longitudeField: string;
latitudeField: string;
longitudeValue: any;
latitudeValue: any;
metricField: string;
metricValue: any;
row: IKeyValues;
}
export interface IHoneycombEventParams extends IChartEventParams {
currentBuckets: IChartField[];
currentMetrics: IChartField[];
originRow: any[][];
}
export interface ITopologyEventParams extends IChartEventParams {
fromField: string;
toField: string;
fromFieldValue: string;
toFieldValue: string;
row: IKeyValues;
}