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(layout): valid specified component size #5264

Merged
merged 1 commit into from
Jul 4, 2023
Merged

fix(layout): valid specified component size #5264

merged 1 commit into from
Jul 4, 2023

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Jul 3, 2023

Component

修复设置 autoPadding 的时候,设置 component size 不生效的问题。

开始使用

export function unemploymentAreaStackedLegendSize(): G2Spec {
  return {
    type: 'area',
    padding: 'auto',
    width: 800,
    data: {
      type: 'fetch',
      value: 'data/unemployment-by-industry.csv',
    },
    transform: [{ type: 'stackY' }],
    encode: {
      x: 'date',
      y: 'unemployed',
      color: 'industry',
    },
    legend: { color: { size: 50 } }, // 设置图例的高度。
    viewStyle: {
      viewFill: '#4e79a7',
      plotFill: '#f28e2c',
      mainFill: '#e15759',
      contentFill: '#76b7b2',
    },
  };
}

@pearmini pearmini requested a review from hustcc July 3, 2023 09:20
@pearmini pearmini merged commit e9edea2 into v5 Jul 4, 2023
@pearmini pearmini deleted the fix/legend-size branch July 4, 2023 01:44
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