export interface PlainObject { [propsName: string]: T; } export interface ChartField { name?: string; label?: string; key?: string; table?: string; customLabel?: string; fieldType: 'modelField' | 'expression' | 'group' | 'dataBucket'; field: string; statisticsFunction?: string; orderBy: string; as: string; valueType?: string; serieChartType?: string; formatter?: string; totalField?: string; totalFieldAs?: string; totalFieldFunc?: string; } export interface ModelField { name: string; type: string; label: string; isForeignKey?: boolean; key?: string; table?: string; } export interface Dimension extends ChartField { } export interface Measure extends ChartField { formatter: string; formatterToFixed?: number; formatterClearZero?: boolean; } export interface OriginParams { dataSourceType: 'dataModel' | 'dataSet' | 'context'; model?: string; dataSet?: string; __modelFields: ModelField[]; __relationModelFields: any[]; dimensions?: Dimension[]; measures: Measure[]; measures2?: Measure[]; doubleYAxis?: boolean; whereConditionRaw?: any; havingConditionRaw?: any; limit?: number; groupField?: string; bubbleField?: Measure[]; } export interface LabelConfig { labelShow: boolean; labelFontSize: number; labelColor: string; labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideBottomLeft' | 'insideTopRight' | 'insideBottomRight'; } export interface TitleConfig { titleShow?: boolean; titleText?: string; titleAlignment?: 'left' | 'center' | 'right'; titleColor?: string; titleBackgroundColor?: string; titleFontSize?: string; titleLink?: string; titleTextStyle?: TextStyle; } export interface TextStyle { color?: string; fontSize?: string; fontStyle?: string; fontWeight?: string; fontFamily?: string; lineHeight?: string; } export interface AxisTickStyleStyle { show?: boolean; length?: number; color?: string; width?: number; } export interface ChartItemStyle { borderColor?: string; borderWidth?: string; borderType?: string; opacity?: number; borderRadius?: string; } export interface LegendConfig { type: string; legendType: string; legendShow?: boolean; legendFontSize?: number; legendColor?: string; legendAlign?: 'auto' | 'left' | 'right'; legendOrient?: 'horizontal' | 'vertical'; legendPosition?: 'left' | 'right' | 'top' | 'bottom' | 'leftTop' | 'rightTop' | 'leftBottom' | 'rightBottom'; legendWidth?: number | string; legendHeight?: number | string; legendTop?: number | string; legendRight?: number | string; legendBottom?: number | string; legendLeft?: number | string; legendTextStyle?: TextStyle; legendDataShow?: boolean; legendDataFormat?: string; dimensions?: Array; measures?: Array; groupField?: string; } export interface JSONObject { [key: string]: any; } export interface SelectParams { exp?: string; table?: string; column?: string; case?: { when: any; then: any; }[]; else?: any; as?: string; func?: string; } export interface CustomReportFields { expressions?: any[]; groups?: any[]; dataBuckets?: any[]; }