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(line): support missing trail #5227

Merged
merged 1 commit into from
Jun 25, 2023
Merged

fix(line): support missing trail #5227

merged 1 commit into from
Jun 25, 2023

Conversation

pearmini
Copy link
Member

close: #5184

export function aaplLineMissingDataTrial(): G2Spec {
  return {
    type: 'line',
    data: {
      type: 'fetch',
      value: 'data/aapl.csv',
      transform: [
        { type: 'slice', end: 100 },
        {
          type: 'map',
          callback: (d) => ({
            ...d,
            close1: d.date.getDate() <= 14 ? NaN : d.close,
          }),
        },
      ],
    },
    encode: {
      x: 'date',
      y: 'close1',
      size: 'close',
    },
    style: { shape: 'trail' },
  };
}

@pearmini pearmini merged commit 3eb6b61 into v5 Jun 25, 2023
2 of 3 checks passed
@pearmini pearmini deleted the fix/missing-trail branch June 25, 2023 07:32
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.

trail 支持断开的情况
2 participants