How to use the @antv/g2plot.Ring function in @antv/g2plot

To help you get started, we’ve selected a few @antv/g2plot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / G2Plot / examples / pie / ring / demo / ring-basic.js View on Github external
},
  {
    type: '分类四',
    value: 15,
  },
  {
    type: '分类五',
    value: 10,
  },
  {
    type: '其它',
    value: 5,
  },
];

const ringPlot = new Ring(document.getElementById('container'), {
  forceFit: true,
  title: {
    visible: true,
    text: '环图',
  },
  description: {
    visible: true,
    text: '环图的外半径决定环图的大小,而内半径决定环图的厚度。',
  },
  radius: 0.8,
  padding: 'auto',
  data,
  angleField: 'value',
  colorField: 'type',
});
github antvis / G2Plot / examples / pie / ring / demo / ring-central-text.js View on Github external
},
  {
    type: '分类四',
    value: 15,
  },
  {
    type: '分类五',
    value: 10,
  },
  {
    type: '其它',
    value: 5,
  },
];

const ringPlot = new Ring(document.getElementById('container'), {
  forceFit: true,
  title: {
    visible: true,
    text: '环图-中心文本',
  },
  description: {
    visible: true,
    text: '环图中心文本能够代替tooltip,在环图中心挖空部分显示各分类的详细信息。',
  },
  radius: 0.8,
  padding: 'auto',
  data,
  angleField: 'value',
  colorField: 'type',
  annotation: [{ type: 'centralText', onActive: true }],
  label: {