You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "rooney (via GitHub)" <gi...@apache.org> on 2025/01/29 13:28:30 UTC
[PR] feat(bar): provide more options for emphasis focus ('stack', … [echarts]
rooney opened a new pull request, #20724:
URL: https://github.com/apache/echarts/pull/20724
…'stackSeries', and 'dataIndex'). close #20723
## Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
### What does this PR do?
Implement new options for `emphasis.focus`: 'stack' | 'stackSeries' | 'dataIndex'
### Fixed issues
- #20723
## Details
### Before: What was the problem?
On stacked bar charts, on hover, need to be able to emphasize the stack (not just 'self'):

### After: How does it behave after the fixing?
You can specify `emphasis: { focus: 'stack' }` in the options.
## Document Info
One of the following should be checked.
- [ ] This PR doesn't relate to document changes
- [X] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
## Misc
### ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
### Related test cases or examples to use the new APIs
- [X] Test case and examples should be added later
## Others
### Merging options
- [ ] Please squash the commits into a single one when merging.
### Other information
What tests I should add?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [PR] feat(bar): provide more options for emphasis focus ('stack', … [echarts]
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on code in PR #20724:
URL: https://github.com/apache/echarts/pull/20724#discussion_r1942315042
##########
src/util/states.ts:
##########
@@ -450,6 +452,7 @@ export function blurSeries(
}
const targetSeriesModel = ecModel.getSeriesByIndex(targetSeriesIndex);
+ const targetStack = targetSeriesModel.option.type === 'bar' && (targetSeriesModel.option as BarSeriesOption).stack;
Review Comment:
Please use `targetSeriesModel.get('type')` instead of accessing `option` directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [PR] feat(bar): provide more options for emphasis focus ('stack', … [echarts]
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #20724:
URL: https://github.com/apache/echarts/pull/20724#issuecomment-2621656189
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
Document changes are required in this PR. Please also make a PR to [apache/echarts-doc](https://github.com/apache/echarts-doc) for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the `PR: awaiting doc` label.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org