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): series gradient #5225

Merged
merged 3 commits into from
Jun 25, 2023
Merged

fix(line): series gradient #5225

merged 3 commits into from
Jun 25, 2023

Conversation

pearmini
Copy link
Member

export function stocksLineSeriesGradient(): G2Spec {
  return {
    type: 'line',
    data: {
      type: 'fetch',
      value: 'data/stocks.csv',
    },
    encode: {
      x: (d) => new Date(d.date),
      y: 'price',
      series: 'symbol',
      color: 'price',
    },
    legend: { size: false },
    style: {
      gradient: 'y',
      strokeWidth: 10,
      shape: 'smooth',
    },
  };
}

@pearmini pearmini merged commit 07cc02a into v5 Jun 25, 2023
3 checks passed
@pearmini pearmini deleted the fix/series-gradient branch June 25, 2023 03:55
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.

系列折线图设置渐变色失败 gradient style 导致 line 绘制异常
2 participants