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(slider): auto layout #5274

Merged
merged 1 commit into from
Jul 6, 2023
Merged

feat(slider): auto layout #5274

merged 1 commit into from
Jul 6, 2023

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented Jul 6, 2023

Slider

效果

export function alphabetIntervalAutoPaddingSlider(): G2Spec {
  return {
    type: 'interval',
    padding: 'auto',
    transform: [{ type: 'sortX', by: 'y', reverse: true }],
    data: {
      type: 'fetch',
      value: 'data/alphabet.csv',
    },
    encode: {
      x: 'letter',
      y: 'frequency',
      color: 'steelblue',
    },
    axis: {
      y: { labelFormatter: (d) => d + '0000' },
      x: { labelFormatter: (d) => d + '0000' },
    },
    slider: { x: true, y: true },
    viewStyle: {
      viewFill: '#4e79a7',
      plotFill: '#f28e2c',
      mainFill: '#e15759',
      contentFill: '#76b7b2',
    },
  };
}

@pearmini pearmini requested a review from hustcc July 6, 2023 06:58
@pearmini pearmini merged commit 7ff0978 into v5 Jul 6, 2023
@pearmini pearmini deleted the feat/auto-size-slider branch July 6, 2023 07:17
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.

【v5】Y 轴 slider 显示不全
2 participants