From ded949f9523cf497ac46f802c594c99e176a6bbe Mon Sep 17 00:00:00 2001 From: paleface001 Date: Fri, 27 Mar 2020 13:38:18 +0800 Subject: [PATCH] fix: bullet types --- src/plots/bullet/layer.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/plots/bullet/layer.ts b/src/plots/bullet/layer.ts index 04bc3c4108..a2616f46b1 100644 --- a/src/plots/bullet/layer.ts +++ b/src/plots/bullet/layer.ts @@ -8,6 +8,7 @@ import { LayerConfig } from '../../base/layer'; import { registerPlotType } from '../../base/global'; import BulletRect from './component/bulletRect'; import BulletTarget from './component/bulletTarget'; +import { TextStyle, LineStyle } from '../../interface/config'; import './theme'; const G2_GEOM_MAP = { @@ -22,19 +23,16 @@ export const STACK_FIELD = '$$stackField$$'; export const X_FIELD = '$$xField$$'; export const Y_FIELD = '$$yField$$'; +interface BulletAxisTickLine extends LineStyle { + visible?: boolean; +} + export interface BulletAxis { visible: boolean; position?: 'before' | 'after'; - style?: { - fontSize?: number; - lineHeight?: number; - }; + style?: TextStyle; tickCount?: number; - tickLine?: { - visible: boolean; - lineWidth?: number; - lineDash?: number[]; - }; + tickLine?: BulletAxisTickLine; formatter?: (text: string, idx: number) => string; }