antvis/G2

Do you want to work on this issue?

You can request for a bounty in order to promote it!

gridRow 参数无效 #6053

tenth-person posted onGitHub

问题描述

<!doctype html>
<html lang="en-US">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width" />
  <title>f2</title>
  <script src="https://unpkg.com/@antv/g2/dist/g2.min.js"></script>
</head>
<body>
  <div id="container"></div>
</body>
<script>
  window.onload = function() {
    const chart = new G2.Chart({ autoFit: true, container: 'container' })

    chart.options({
      type: 'interval',
      height: 640,
      data: {
        type: "fetch",
        value: "https://gw.alipayobjects.com/os/bmw-prod/79fd9317-d2af-4bc4-90fa-9d07357398fd.csv",
      },
      encode: { y: "value", color: "name" },
      transform: [{ type: "stackY" }],
      scale: { color: { palette: "spectral", offset: (t) => t * 0.8 + 0.1 } },
      coordinate: { type: "theta", innerRadius: 0.6 },
      style: { stroke: "white", inset: 1, radius: 10 },
      animate: { enter: { type: "waveIn" } },
      legend: {
        color: {
          layout: {
            alignItems: 'center',
            flexDirection: 'column',
            justifyContent: 'center',
          },
          display: 'grid',
          gridCol: 2,   //  显示问题
          gridRow: 5,   //  参数无效
          position: 'right',
          itemMarker: 'circle',
          itemLabelFill: '#167068',
        },
      },
    })

    chart.render()
  }
</script>
</html>

重现链接

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
Only logged in users can fund an issue

Pull requests