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

fix(interaction): transpose sliderFilter #4919

Merged
merged 1 commit into from
Apr 26, 2023
Merged

fix(interaction): transpose sliderFilter #4919

merged 1 commit into from
Apr 26, 2023

Conversation

pearmini
Copy link
Member

  • 问题:tranpose 的图表 sliderFilter 交互有问题。
  • 解决办法:交换 channel。

slider-transpose

export function aaplLineSliderFilterTranspose(): G2Spec {
  return {
    type: 'line',
    paddingLeft: 80,
    coordinate: { transform: [{ type: 'transpose' }] },
    data: {
      type: 'fetch',
      value: 'data/aapl.csv',
    },
    encode: {
      x: (d) => new Date(d.date),
      y: 'close',
    },
    axis: {
      x: { title: false, size: 40 },
      y: { title: false, size: 36 },
    },
    slider: {
      x: { labelFormatter: (d) => format(d, 'YYYY/M/D') },
      y: { labelFormatter: '~s' },
    },
  };
}

@pearmini pearmini merged commit 6dc8e51 into v5 Apr 26, 2023
@pearmini pearmini deleted the fix/slider-transpose branch April 26, 2023 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants