How to use the @antv/g2plot.GroupColumn 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 / column / group / demo / group-column-slider.js View on Github external
.then((data) => {
    const columnPlot = new GroupColumn(document.getElementById('container'), {
      title: {
        visible: true,
        text: '分组柱状图-缩略轴',
      },
      description: {
        visible: true,
        text: '缩略轴 (slider) 交互适用于数据较多,用户希望关注数据集中某个特殊区间的场景。',
      },
      forceFit: true,
      data,
      xField: '城市',
      yField: '销售额',
      groupField: '细分',
      xAxis: {
        visible: true,
        autoHideLabel: true,
github antvis / G2Plot / examples / column / group / demo / group-column.js View on Github external
月份: 'Jun.',
    月均降雨量: 35.5,
  },
  {
    name: 'Berlin',
    月份: 'Jul.',
    月均降雨量: 37.4,
  },
  {
    name: 'Berlin',
    月份: 'Aug.',
    月均降雨量: 42.4,
  },
];

const columnPlot = new GroupColumn(document.getElementById('container'), {
  title: {
    visible: true,
    text: '分组柱状图',
  },
  forceFit: true,
  data,
  xField: '月份',
  yField: '月均降雨量',
  yAxis: {
    min: 0,
  },
  label: {
    visible: true,
  },
  groupField: 'name',
});