You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "jasonpaige (via GitHub)" <gi...@apache.org> on 2023/03/13 21:12:08 UTC
[GitHub] [echarts] jasonpaige opened a new pull request, #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
jasonpaige opened a new pull request, #18376:
URL: https://github.com/apache/echarts/pull/18376
<!-- 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?
This PR adds the ability to 'inverse' any of the axis on a radar chart
### Fixed issues
https://github.com/apache/echarts/issues/18206
## Details
### Before: What was the problem?
Previously a radar chart could look like so:
<img width="500" alt="image" src="https://user-images.githubusercontent.com/314046/224830185-d08977d5-97ac-4c8d-8f48-4db451fb017f.png">
However, you may which the cost to actually reflect negatively, the more expensive it is.
### After: How does it behave after the fixing?
<img width="457" alt="image" src="https://user-images.githubusercontent.com/314046/224830407-68ea033b-5d5a-4d87-9ea1-3d4fbe82fd28.png">
Now this single axis is inverted, where the cheaper the cost, the better it appears on the radar chart.
## 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
### Related test cases or examples to use the new APIs
A test case has been added here: test/radar-inverse.html
The API to inverse an indicator axis works by simply adding `inverse: true` like this:
```
...
indicator: [
{ name: 'Speed'},
{ name: 'Reaction'},
{ name: 'Power'},
{ name: 'Cost £m', inverse: true, min: 4, max: 0},
{ name: 'Stamina'},
],
...
```
--
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] Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18376:
URL: https://github.com/apache/echarts/pull/18376#issuecomment-3536889380
This PR has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR. We are sorry for this but 2 years is a long time and the code base has been changed a lot. Thanks for your contribution anyway.
--
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
[GitHub] [echarts] Ovilia commented on a diff in pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on code in PR #18376:
URL: https://github.com/apache/echarts/pull/18376#discussion_r1142843294
##########
src/coord/radar/Radar.ts:
##########
@@ -67,6 +67,7 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
indicatorAxis.name = indicatorModel.get('name');
// Inject model and axis
indicatorAxis.model = indicatorModel;
+ indicatorAxis.inverse = indicatorModel.get('inverse');
Review Comment:
This is probably not necessary to be set to `indicatorAxis.inverse`. You should call `indicatorModel.get('inverse')` whenever you need the value.
--
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
[GitHub] [echarts] jasonpaige commented on a diff in pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
Posted by "jasonpaige (via GitHub)" <gi...@apache.org>.
jasonpaige commented on code in PR #18376:
URL: https://github.com/apache/echarts/pull/18376#discussion_r1144829967
##########
src/coord/radar/Radar.ts:
##########
@@ -67,6 +67,7 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
indicatorAxis.name = indicatorModel.get('name');
// Inject model and axis
indicatorAxis.model = indicatorModel;
+ indicatorAxis.inverse = indicatorModel.get('inverse');
Review Comment:
Unfortunately, without this line the test graph does not render as expected. I think the Axes needs to know it is inversed as well as the data model which is why this line is there? I assumed this is how it is achieved on the other charts which support the inverse property as the base Axis class has the inverse property set.
--
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
[GitHub] [echarts] Ovilia commented on a diff in pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia commented on code in PR #18376:
URL: https://github.com/apache/echarts/pull/18376#discussion_r1145616347
##########
src/coord/radar/Radar.ts:
##########
@@ -67,6 +67,7 @@ class Radar implements CoordinateSystem, CoordinateSystemMaster {
indicatorAxis.name = indicatorModel.get('name');
// Inject model and axis
indicatorAxis.model = indicatorModel;
+ indicatorAxis.inverse = indicatorModel.get('inverse');
Review Comment:
Thanks for the information. Yes, others may depend on this information.
--
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
[GitHub] [echarts] x-merlin-x commented on pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
Posted by "x-merlin-x (via GitHub)" <gi...@apache.org>.
x-merlin-x commented on PR #18376:
URL: https://github.com/apache/echarts/pull/18376#issuecomment-1694671728
Andy progress on this?
--
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] Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18376:
URL: https://github.com/apache/echarts/pull/18376#issuecomment-3568335664
This PR has been automatically closed because it has not had recent activity. Sorry for that and we are looking forward to your next contribution.
--
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
[GitHub] [echarts] echarts-bot[bot] commented on pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #18376:
URL: https://github.com/apache/echarts/pull/18376#issuecomment-1466963684
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
Re: [PR] Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis [echarts]
Posted by "gkentr (via GitHub)" <gi...@apache.org>.
gkentr commented on PR #18376:
URL: https://github.com/apache/echarts/pull/18376#issuecomment-1814612210
Also happen to have a need for this currently, looks like the CI logs are not available anymore though.
--
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] Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #18376: Fix #18206 - [Feature] Enable indicators Radar charts to invert their axis
URL: https://github.com/apache/echarts/pull/18376
--
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