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: new selectedMode: series and select.disabled #15534

Merged
merged 17 commits into from
Jan 12, 2022
Merged

Feat: new selectedMode: series and select.disabled #15534

merged 17 commits into from
Jan 12, 2022

Conversation

susiwen8
Copy link
Contributor

@susiwen8 susiwen8 commented Aug 14, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Also add series for selectedMode, it's would make whole series selected by on click.

Fix issue

Details

After: How is it fixed in this PR?

Kapture 2021-08-14 at 23 50 23
Kapture 2021-08-15 at 00 11 18

Misc

  • The API has been changed (apache/echarts-doc#xxx).
  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

bar2.html
geo-map.html

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Aug 14, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@pissang pissang added this to the 5.3 milestone Aug 15, 2021
@pissang pissang changed the base branch from master to next September 2, 2021 02:25
@pissang
Copy link
Contributor

pissang commented Jan 5, 2022

Sorry for the late review. Seems to be a very promise feature. Take a quick look and here is one suggestion:

Could selectable be in the root instead of under itemStyle. It's not a style related option and not all series use itemStyle. I think there are two options:

data: [{ selectable: false }]

Or

data: [ select: { disabled: true } ]

This can be designed together with #14952 . Emphasis state can also be disabled:

emphasis: { disabled: true }

Or

hoverEmphasis: false

src/util/types.ts Outdated Show resolved Hide resolved
@susiwen8
Copy link
Contributor Author

susiwen8 commented Jan 5, 2022

@pissang I prefer first one data: [{ selectable: false }]
However the second proposal can provide more fine grade control for item selected state, such as specify select color for single data item

@pissang
Copy link
Contributor

pissang commented Jan 5, 2022

@susiwen8 We aready have select for each data item. Where we can sepcify selected color and other styles. From my side I prefer using select.disabled. And it will be more consistent with emphasis.disabled.

@susiwen8
Copy link
Contributor Author

susiwen8 commented Jan 6, 2022

@pissang Please check again

@pissang
Copy link
Contributor

pissang commented Jan 6, 2022

It's more common to use enabled / disabled instead of enable / disable. For example in highcharts https://api.highcharts.com/highcharts/boost.enabled

@susiwen8
Copy link
Contributor Author

susiwen8 commented Jan 6, 2022

@pissang Oops I was meant to use disabled

src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
@susiwen8 susiwen8 requested a review from pissang January 7, 2022 15:01
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
@susiwen8 susiwen8 requested a review from plainheart January 9, 2022 06:28
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
src/model/Series.ts Outdated Show resolved Hide resolved
@susiwen8 susiwen8 requested a review from pissang January 11, 2022 13:55
pissang
pissang previously approved these changes Jan 12, 2022
@pissang
Copy link
Contributor

pissang commented Jan 12, 2022

LGTM now. @plainheart any more comments?

@pissang
Copy link
Contributor

pissang commented Jan 12, 2022

@susiwen8 BTW it's not correct to use chore prefix in the commit message here. chore means updating grunt tasks etc; no production code change

src/model/Series.ts Outdated Show resolved Hide resolved
@pissang pissang merged commit fface60 into apache:next Jan 12, 2022
@echarts-bot
Copy link

echarts-bot bot commented Jan 12, 2022

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@susiwen8 susiwen8 deleted the unselect branch January 12, 2022 15:08
@pissang pissang changed the title Feat: new selectedMode and selectable for item Feat: new selectedMode: series and select.disabled Jan 13, 2022
@pissang pissang mentioned this pull request Jan 13, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support that some region selectable:false in geo.
3 participants