You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/12/10 08:23:12 UTC
[GitHub] [incubator-echarts] Ovilia opened a new pull request #13788: feat(colorBy): provide option.colorBy #13731
Ovilia opened a new pull request #13788:
URL: https://github.com/apache/incubator-echarts/pull/13788
<!-- Please fill in the following information to help us review your PR more efficiently. -->
## Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
### What does this PR do?
<!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
Provide an option for users to use color palette on each data items of the same series.
### Fixed issues
- #13731: Enable series like bars to use palette color for each data
## Details
### Before: What was the problem?
Series like bar charts use the color palette to distinguish different series. But there is no easy way to use the palette for each data item except than setting `itemStyle.color` for each data item, which is quite tedious.
### After: How is it fixed in this PR?
Series can set `colorBy` to be `'item'` to use the color palette for each data item, which by default is `'series'` or `'item'` depending on series type.
## Usage
### Are there any API changes?
- [x] The API has been changed.
`option.colorBy` and `option.series.colorBy` are provided.
### Related test cases or examples to use the new APIs
`test/colorBy.html`
## Others
### Merging options
- [ ] Please squash the commits into a single one when merge.
### Other information
Todo:
- [x] Provide `series.colorBy` for each series type
- [ ] Deprecate `colorMappingBy` and use `colorBy` to compat
- [ ] Enable sunburst using different color palette policies like using the palette for each level or each data item
----------------------------------------------------------------
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.
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
[GitHub] [incubator-echarts] echarts-bot[bot] commented on pull request #13788: feat(colorBy): provide option.colorBy #13731
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #13788:
URL: https://github.com/apache/incubator-echarts/pull/13788#issuecomment-742362946
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/incubator-echarts/wiki/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.
Document changes are required in this PR. Please also make a PR to [apache/incubator-echarts-doc](https://github.com/apache/incubator-echarts-doc) for document changes. 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.
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
[GitHub] [incubator-echarts] Ovilia commented on a change in pull request #13788: feat(colorBy): provide option.colorBy #13731
Posted by GitBox <gi...@apache.org>.
Ovilia commented on a change in pull request #13788:
URL: https://github.com/apache/incubator-echarts/pull/13788#discussion_r551144049
##########
File path: src/chart/pie/PieSeries.ts
##########
@@ -122,12 +122,11 @@ class PieSeriesModel extends SeriesModel<PieSeriesOption> {
static type = 'series.pie' as const;
- useColorPaletteOnData = true;
-
/**
* @overwrite
*/
init(option: PieSeriesOption): void {
+ console.log('init');
Review comment:
Thanks for correcting. That should be removed.
If you want to log information in dev mode, `if (__DEV__)` should be used.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-echarts] chfw commented on a change in pull request #13788: feat(colorBy): provide option.colorBy #13731
Posted by GitBox <gi...@apache.org>.
chfw commented on a change in pull request #13788:
URL: https://github.com/apache/incubator-echarts/pull/13788#discussion_r546966702
##########
File path: src/chart/pie/PieSeries.ts
##########
@@ -122,12 +122,11 @@ class PieSeriesModel extends SeriesModel<PieSeriesOption> {
static type = 'series.pie' as const;
- useColorPaletteOnData = true;
-
/**
* @overwrite
*/
init(option: PieSeriesOption): void {
+ console.log('init');
Review comment:
I assume this is a debug print. Does echarts build remove console log automatically?
----------------------------------------------------------------
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.
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