-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 修复 tiny 图表 tooltip 不统一问题 * fix: 修改 test 路径 Co-authored-by: liufu.lf <liufu.lf@antfin.com>
- Loading branch information
Showing
11 changed files
with
21 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { Options, StyleAttr } from '../../types'; | ||
import { TinyTooltipOption } from '../../types/tooltip'; | ||
|
||
/** mini 图类型定义需要 omit 很多的 G2 Options 配置 */ | ||
export interface TinyColumnOptions extends Omit<Options, 'data' | 'tooltip' | 'legend' | 'label'> { | ||
export interface TinyColumnOptions extends Omit<Options, 'data' | 'legend' | 'label'> { | ||
/** 具体的数据 */ | ||
readonly data: number[]; | ||
/** 柱状图宽度占比 [0-1] */ | ||
readonly columnWidthRatio?: number; | ||
/** 迷你柱形图形样式 */ | ||
readonly columnStyle?: StyleAttr; | ||
/** tooltip配置 */ | ||
readonly tooltip?: boolean | TinyTooltipOption; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
import { TooltipOption } from '@antv/g2/lib/interface'; | ||
import { Datum } from './common'; | ||
|
||
export type Tooltip = TooltipOption; | ||
|
||
export type TinyTooltipOption = { | ||
/** tootip body模版语言 */ | ||
readonly formatter?: (datum: Datum) => string; | ||
/** 获取tooltip内部dom节点覆写样式 */ | ||
readonly domStyles?: object; | ||
/** tooltip定位位置 */ | ||
readonly position?: 'top' | 'bottom' | 'left' | 'right'; | ||
/** tooltip偏移位置 */ | ||
readonly offset?: number; | ||
/** 是否显示交叉线 */ | ||
readonly showCrosshairs?: boolean; | ||
/** 是否显示 tooltip 数据点 marker */ | ||
readonly showMarkers?: boolean; | ||
}; |