-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
646 additions
and
853 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import type { Types } from '@antv/g2'; | ||
// import type { Types } from '@antv/g2'; | ||
|
||
export function genMiniTooltipOptions(type: 'mini' | 'default', options?: Types.TooltipCfg): Types.TooltipCfg { | ||
const res: Types.TooltipCfg = { | ||
showTitle: false, | ||
showMarkers: true, | ||
enterable: true, | ||
domStyles: { | ||
'g2-tooltip': { padding: '0px' }, | ||
'g2-tooltip-title': { display: 'none' }, | ||
'g2-tooltip-list-item': { margin: '4px' } | ||
}, | ||
...options | ||
}; | ||
if (type === 'mini') { | ||
res.position = 'top'; | ||
res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' }; | ||
res.itemTpl = `<li>{value}</li>`; | ||
res.offset = 8; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export function genMiniTooltipOptions(): any { | ||
// const res: Types.TooltipCfg = { | ||
// showTitle: false, | ||
// showMarkers: true, | ||
// enterable: true, | ||
// domStyles: { | ||
// 'g2-tooltip': { padding: '0px' }, | ||
// 'g2-tooltip-title': { display: 'none' }, | ||
// 'g2-tooltip-list-item': { margin: '4px' } | ||
// }, | ||
// ...options | ||
// }; | ||
// if (type === 'mini') { | ||
// res.position = 'top'; | ||
// res.domStyles!['g2-tooltip'] = { padding: '0px', backgroundColor: 'transparent', boxShadow: 'none' }; | ||
// res.itemTpl = `<li>{value}</li>`; | ||
// res.offset = 8; | ||
// } | ||
|
||
return res; | ||
// return res; | ||
return {}; | ||
} |
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
Oops, something went wrong.