antvis/G2

如何设置标签文本字体大小 #6111

senlinmilelu posted onGitHub

问题描述

TreemapChart每一个数据标签文字大小怎么设置

export default function Treemap(datas) { dv.source(datas, { type: 'hierarchy', }).transform({ field: 'value', type: 'hierarchy.treemap', tile: 'treemapResquarify', as: ['x', 'y'] , });

  return (
      <>
          <TreemapChart
              height={800}
              data={dv.rows.data}
              description={{visible: false}}
              colorField='name'
              label={{
                  style: {
                      textBaseline: 'middle',
                      // fontSize:20,//通过data值设置
                  },
              }}
         </TreemapChart>
     </>
  )

}

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


Fund this Issue

$0.00
Funded

Pull requests