Skip to content
Discussion options

You must be logged in to vote

問題解決了,以下擷取相關的部分,分享自己的作法給有需要的開發者們參考:

import { Bar } from '@ant-design/charts';

// Render flag SVG
const renderFlag = ({ x, y }: { x: number; y: number }, context: any) => {
  const { document } = context;
  const g = document.createElement('g', {});

  // 使用 document.createElement 繪製各個部分
  // 使用 g.appendChild() 加入繪製的部分

  return g;
};

// Render check icon SVG
const renderCheckIcon = ({ x, y }: { x: number; y: number }, context: any) => {
  const { document } = context;
  const g = document.createElement('g', {});

  // 使用 document.createElement 繪製各個部分
  // 使用 g.appendChild() 加入繪製的部分

  return g;
};

const config = {
  data: officeData,
  xField: 'office_name',
  yField: 'count',
  paddin…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jane-lin-tg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants