antvis / G2Plot

:dango: An interactive and responsive charting library based on G2.
https://g2plot.antv.antgroup.com
MIT License
2.56k stars 607 forks source link

🐛 [BUG] 在有坐标轴的Mix多层图表内配置legend失效 #3698

Open ulleo opened 1 year ago

ulleo commented 1 year ago

在这个例子里增加legend的配置不生效 https://g2plot.antv.antgroup.com/zh/examples/plugin/multi-view/#combo-plot

但是在这个没有坐标轴的图里面加legend配置是生效的 https://g2plot.antv.antgroup.com/zh/examples/plugin/multi-view/#composite-funnel

determinationlove commented 6 months ago

可以試試在 plots 裡個別設置 legend

<Mix
  plots={[
    {
      type: "column",
      top: true,
      options: {
        legend: {
          position: "top-right",
        },
      },
    },
    {
      type: "line",
      top: true,
      options: {
        legend: {
          position: "top-right",
        },
      },
    },
  ]}
/>