通过 runtime 中的信息,来推断组件的信息,主要为:

    • type
    • position

    推断逻辑的信息来源为:

    • geometry + shape
    • coordinate
    • scale | geometry | coordinate | channel scale | 结果 | | —- | —- | —- | —- | | line | rect |
      | | | | polar |
      | | | area | rect |
      | | | | polar |
      | | | interval | rect |
      |
      | | | polar |
      |
      - 且没有 transpose,不显示 x y
      | | point | rect |
      |
      | | | polar |
      |
      | | text | rect | | | | | polar | | | | image | rect |
      |
      | | | polar |
      |
      | | polygon | rect |
      | | | | polar |
      | | | grid | rect |
      |
      | | | polar |
      |
      | | link | rect |
      |
      | | | polar |
      |
      | | schema | rect |
      |
      | | | polar |
      |
      | | vector | rect |
      |
      | | | polar |
      |
      | | node | rect |
      | | | | polar |
      |
      - 不显示 x y 轴
      | | edge | rect |
      | | | | polar |
      |
      - 不显示 x y 轴
      |

    总结规则为:

    • interval、node、edge 三个 Geometry 在 polar 下不展示 x y 轴。
    • channel scale 的类型,对应的组件类型逻辑一致。
      • x -> AxisX
      • y -> AxisY
      • color -> Legend
        • linear、time、log、pow 等连续图例
          • 数字
          • color
        • ordial、band、point 等离散
      • shape -> Legend