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

series->symbol支持函数类型,根据需要来设置每个数据的图形 #9664

Merged
merged 1 commit into from
Feb 24, 2019

Conversation

SmartSmallFish
Copy link

series->symbol支持函数类型
如果需要每个数据的图形不一样,可以设置为如下格式的回调函数:
(value: Array|number, params: Object) => number|Array
eg.

symbol: function (value, params) {
  return `${symbol}`;
}

注:返回的symbol支持类型同之前

@SmartSmallFish
Copy link
Author

series.scatter -> symbol

Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helllojayden Could you further explain what this is used for? Because for scatter series, you may define symbol.

@Ovilia Ovilia closed this Feb 18, 2019
@Ovilia Ovilia reopened this Feb 18, 2019
@Ovilia
Copy link
Contributor

Ovilia commented Feb 18, 2019

Sorry. Closed by mistake. Reopened.

@SmartSmallFish
Copy link
Author

when typeof symbolType === 'function', it will invoke and return the symbol, just like symbolSize

@SmartSmallFish
Copy link
Author

i do not define a new symbol type, when symbolType is the function type, it invoked and return the
symbol that types supported before

@SmartSmallFish
Copy link
Author

SmartSmallFish commented Feb 20, 2019

@Ovilia sorry to reply late,i explained in the comments

@Ovilia
Copy link
Contributor

Ovilia commented Feb 22, 2019

OK. I'm not sure this is how symbols work. @100pah Please have a look.

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.

3 participants