antvis/G6

扩展toolitp里的TooltipStyleProps要怎么使用?文档没有写,直接在plugins写是不生效的 #5976

yimouren posted onGitHub

举个例子 plugins: [ { type: 'tooltip', position: 'top', title: 'toolitp', getContent: (e, items) => { return formatTooltip(items?.[0]?.data) } } ] 其中title并不生效


tooltip 支持两种模式:

  1. 使用内置样式,此时通过 title,data 来配置数据
  2. 更通常的情况时传入 getContent ,此时 tooltip 的内容完全由用户进行自定义(这回使得 title 等属性不生效) 参考示例:https://g6-next.antv.antgroup.com/examples/plugin/tooltip/#basic
posted by Aarebecca 10 months ago

Fund this Issue

$0.00
Funded

Pull requests