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(api): update mark-level plot and apply viewStyle #5102

Merged
merged 1 commit into from
May 26, 2023
Merged

Conversation

pearmini
Copy link
Member

@pearmini pearmini commented May 26, 2023

chart.options

修复两个和 chart.options 有关的问题。

更新 Mark-Level Plot 失效

内部会 normalize 成 view 包裹 interval,导致 data 更新到 view 上,而不是 interval 上。解决办法是保存一下上一次的类型,如果本次没有声明类型,就是使用上一次的类型。

chart.options({
  type: 'interval',
});

// 更新失效
chart.options({
  data: [1, 2, 3],
});

Mark-Level viewStyle 失效

chat.options({
  type: 'interval',
  viewStyle: {
     plotFill: '#f28e2c',
     viewFill: 'red'
  }
})

@pearmini pearmini requested a review from hustcc May 26, 2023 07:01
@pearmini pearmini merged commit f239cba into v5 May 26, 2023
@pearmini pearmini deleted the fix/chart-options branch May 26, 2023 07:41
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