Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composite mark 交互不生效 #5463

Closed
pearmini opened this issue Aug 25, 2023 · 1 comment · Fixed by #5524
Closed

composite mark 交互不生效 #5463

pearmini opened this issue Aug 25, 2023 · 1 comment · Fixed by #5524

Comments

@pearmini
Copy link
Member

复合 Mark 的 legendFilter 交互失效:

function Pie(options, context) {
  const { encode = {}, ...rest } = options;
  const { value, ...restEncode } = encode;
  return deepMix(rest, {
    type: 'interval',
    transform: [{ type: 'stackY' }],
    coordinate: { type: 'theta' },
    encode: {
      ...restEncode,
      y: value,
    },
  });
}

const chart = new Chart({ container, canvas });

chart.options({
  type: Pie,
  data: [
    { genre: 'Sports', sold: 275 },
    { genre: 'Strategy', sold: 115 },
    { genre: 'Action', sold: 120 },
    { genre: 'Shooter', sold: 350 },
    { genre: 'Other', sold: 150 },
  ],
  // @ts-ignore
  encode: { value: 'sold', color: 'genre' },
});
@pearmini
Copy link
Member Author

pearmini commented Sep 6, 2023

可能和交互的传递有关系。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant