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

feat(legend): continuous filter #5356

Merged
merged 1 commit into from
Aug 2, 2023
Merged

feat(legend): continuous filter #5356

merged 1 commit into from
Aug 2, 2023

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Jul 28, 2023

Legend Filter

  • 新增连续的 legendFilter。
  • 修复连续比例尺范围展示不正确的问题。

开始使用

export function settleWeatherCellGrouped(): G2Spec {
  return {
    type: 'cell',
    height: 300,
    data: {
      type: 'fetch',
      value: 'data/seattle-weather.csv',
    },
    encode: {
      x: (d) => new Date(d.date).getUTCDate(),
      y: (d) => new Date(d.date).getUTCMonth(),
      color: 'temp_max',
    },
    transform: [{ type: 'group', color: 'max' }],
    scale: {
      x: { compare: (a, b) => +a - +b },
      y: { compare: (a, b) => +a - +b },
    },
    legend: { color: { layout: { justifyContent: 'flex-start' } } },
    style: { inset: 0.5 },
  };
}

@pearmini pearmini force-pushed the feat/legend-filter branch from 080a3f3 to 5285a35 Compare August 2, 2023 03:27
@pearmini pearmini changed the title [WIP] feat(legend): continuous filter feat(legend): continuous filter Aug 2, 2023
@pearmini pearmini requested a review from hustcc August 2, 2023 03:40
@pearmini pearmini merged commit 5f866cb into v5 Aug 2, 2023
@pearmini pearmini deleted the feat/legend-filter branch August 2, 2023 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants