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(axis): autoHide should not set crossSize #5032

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

pearmini
Copy link
Member

fix: #4965

对于 autoHide,不应该设置 crossSize,否者会出现如下结果:

image

export function aaplLineAxisYHide(): G2Spec {
  return {
    type: 'line',
    height: 200,
    paddingLeft: 80,
    data: {
      type: 'fetch',
      value: 'data/aapl.csv',
    },
    encode: {
      x: 'date',
      y: 'close',
    },
    axis: {
      x: false,
      y: { labelFormatter: (d) => `${d}000`, transform: [{ type: 'hide' }] },
    },
  };
}

修复后:

image

@pearmini pearmini requested review from Aarebecca and hustcc May 16, 2023 07:42
@pearmini pearmini merged commit 86052fc into v5 May 16, 2023
@pearmini pearmini deleted the fix/axis-auto-hide branch May 16, 2023 08:22
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.

axis autoHide 在文本过长的的时候会卡死的情况
2 participants