You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2022/04/06 08:27:26 UTC

[GitHub] [echarts] BillYu811 opened a new issue, #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

BillYu811 opened a new issue, #16840:
URL: https://github.com/apache/echarts/issues/16840

   ### Version
   
   5.3.0
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/billyu811/pen/QWaQZvg
   
   ### Steps to Reproduce
   
   1.I want to create a polar chart as usual, but it has negative values ​​on the radius axis.
   2.I got data from BE use axios.
   3.I didn't get the effect I wanted,I want it to fill the bar towards positive numbers starting from a minimum value.
   But it turned out to be this:
   https://codepen.io/billyu811/pen/QWaQZvg
   4.then I tried to change the min, max, scale, axisLine.onZero of the radius axis, they are not work.
   I can't find a solution in the doc.
   Until I saw a PR that seemed to fixed the same problem.But I don't know why it reappeared.
   https://github.com/apache/echarts/pull/12418
   
   ### Current Behavior
   
   I want to create a polar chart, but I got the opposite bar.
   
   ### Expected Behavior
   
   I want fill the bar towards positive numbers starting from a minimum value.
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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: dev-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #16840: [Bug]

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1089987042

   I'm sorry to close this issue for it lacks the necessary title. Please provide **a _descriptive_ and as _concise_ as possible title to describe your problems or requests** and then the maintainers or I will reopen this issue.
   
   Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.
   
   A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.
   
   Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


[GitHub] [echarts] BillYu811 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
BillYu811 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1093788038

   First of all, thanks for your reply, have a happy weekend,
   
   This sample seems to solve my problem to a certain extent, But I'm worried that when my data changes I also have to modify my FE code =>
   
   - First: I can't predict what kind of data will get from the BE.
   
   - Second: I would prefer to build a reusable component that will adapt to any situation. This is more in line with engineering thinking.
   
   - At the same time, this sample code doesn't seem very elegant.
   
   All in all, I think maybe we need a new feat that accepts a value as a starting value?
   @pissang @jiawulin001 
   
   
   > Interestingly enough, I find all bar charts start at 0. And since radius axis bar charts are based on original charts, they must also start at 0. @pissang Does Echarts need a new feature to accept a number instead of 0 as the starting value of the bar chart? However, there are still alternatives for @BillYu811 to achieve the effect you want. Here's an example but need a bit adjustment on data.
   > 
   > Code Sample
   
   


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


[GitHub] [echarts] jiawulin001 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1093774144

   Interestingly enough, I find all bar charts start at 0. And since radius axis bar charts are based on original charts, they must also start at 0. @pissang Does Echarts need a new feature to accept a number as the starting value of the bar chart? 
   However, there's still alternatives for @BillYu811 to achieve the effect you want. Though you may need to adjust the data a little bit. Here's an example.
   <details>
   <summary>Code Sample</summary>
   
   ```
   option = {
     title: [
       {
         text: 'Radial Polar Bar Label Position (middle)'
       }
     ],
     polar: {
       radius: [30, '80%']
     },
     radiusAxis: {
       min:0,
       max:30,
       axisLabel:{
         formatter: value=>value-120
       },
     },
     angleAxis: {
       type: 'category',
       data: ["  0-30", " 30-60", " 60-90", " 90-120", "120-150", "150-180", "180-210", "210-240", "240-270", "270-300", "300-330", "330-360"],
       startAngle: 75
     },
     tooltip: {
       formatter: (params)=> `${params.name}: ${(params.value-120).toFixed(1)}`
     },
     series: {
       type: 'bar',
       color: "#F53700",
       data: [13, 13, 12, 11, 10, 10, 10, 11, 11, 13, 12, 13 ],
       //data: [-107,-107,-108,-109,-110,-110,-110,-109,-109,-107,-108,-107],
       coordinateSystem: 'polar',
       label: {
         show: true,
         formatter: (params)=> `${(params.value-120)}`
       }
     },
     backgroundColor: '#fff',
     animation: false
   };
   ```
   </details>


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


[GitHub] [echarts] BillYu811 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
BillYu811 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1095877440

   I'm very sorry for my short description, it caused you to misunderstand what I meaning.Please allow me to express in more details:
   
   - I am trying to use echart-5.3.0 in VUE to achieve the following effects: https://codepen.io/billyu811/pen/QWaQZvg
   - This PR should have fixed the issue I raised, **but it didn't**, **this bug reappeared in 5.3.0 or earlier**. https://github.com/apache/echarts/pull/12418
   -  I am confused that this bug is not present in the version of echart used by py-echart. **Even though that echart version does what I want, I can't use it in npm.**
   - I could use the alternative in the code sample above, but it's not elegant enough. It may prone to some unknown bugs. I described my worries above.
   - To sum up, I think a new official feature will be best.
   please let me know what you thinking.
   @jiawulin001 
   
   > I guess that's because the result you want is the problem that #12418 wants to solve. Anyway, glad that you find a way to solve it.
   
   


-- 
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] BillYu811 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
BillYu811 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1093794354

   Also I found an interesting thing, when I used "pyechart" to render the result I wanted, it did what I expected. Like the example below:
   https://codepen.io/billyu811/pen/VwyxNep
   This also makes me very suspicious.
   @jiawulin001 @pissang 
   
   > Interestingly enough, I find all bar charts start at 0. And since radius axis bar charts are based on original charts, they must also start at 0. @pissang Does Echarts need a new feature to accept a number instead of 0 as the starting value of the bar chart? However, there are still alternatives for @BillYu811 to achieve the effect you want. Here's an example but need a bit adjustment on data.
   > 
   > Code Sample
   


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


[GitHub] [echarts] BillYu811 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
BillYu811 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1102094851

   Any update? @jiawulin001 @pissang 


-- 
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: [I] [Bug] When polar coordinates are negative, it still renders the bar from 0. [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-2065320406

   This issue has been automatically marked as stale because it did not have 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 issue.


-- 
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: [I] [Bug] When polar coordinates are negative, it still renders the bar from 0. [echarts]

Posted by "Ovilia (via GitHub)" <gi...@apache.org>.
Ovilia closed issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.
URL: https://github.com/apache/echarts/issues/16840


-- 
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] closed issue #16840: [Bug]

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #16840: [Bug] 
URL: https://github.com/apache/echarts/issues/16840


-- 
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: dev-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org


Re: [I] [Bug] When polar coordinates are negative, it still renders the bar from 0. [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-2078174568

   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


-- 
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: [I] [Bug] When polar coordinates are negative, it still renders the bar from 0. [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.
URL: https://github.com/apache/echarts/issues/16840


-- 
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] jiawulin001 commented on issue #16840: [Bug] When polar coordinates are negative, it still renders the bar from 0.

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16840:
URL: https://github.com/apache/echarts/issues/16840#issuecomment-1095847312

   I guess that's because the result you want is the problem that #12418 wants to solve. Anyway, glad that you find a way to solve it.


-- 
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