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/30 09:36:01 UTC

[GitHub] [incubator-echarts] CrotchBurnt opened a new issue #13912: index in axisLabel’s formatter doesn't work as expected when "inverse=true"

CrotchBurnt opened a new issue #13912:
URL: https://github.com/apache/incubator-echarts/issues/13912


   ### Version
   4.4.0
   
   ### Steps to reproduce
   横向柱状图设置如此:
               axisLabel: {
                 formatter: function(value, index) {
                   switch (index) {
                     case 0:
                       return '{a|} '   value
                       break
                     case 1:
                       return '{b|} '   value
                       break
                     case 2:
                       return '{c|} '   value
                       break
                     default:
                       return value
                   }
                 }
   }
   
   ### What is expected?
   Whenever there's "inverse=true", the first three of data should be styled
   
   ### What is actually happening?
   The first three are styled before the inversion.
   
   ---
   inverse=true的时候,formatter的index还是按照原始数据的顺序来的,导致我不能按真实的显示顺序给前三位标记样式。
   或者有其他的实现方法吗?
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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 issue #13912: index in axisLabel’s formatter doesn't work as expected when "inverse=true"

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


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
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 issue #13912: index in axisLabel’s formatter doesn't work as expected when "inverse=true"

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


   @CrotchBurnt Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://www.makeapie.com/editor.html.


----------------------------------------------------------------
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] SnailSword commented on issue #13912: index in axisLabel’s formatter doesn't work as expected when "inverse=true"

Posted by GitBox <gi...@apache.org>.
SnailSword commented on issue #13912:
URL: https://github.com/apache/incubator-echarts/issues/13912#issuecomment-754817496


   Does this meet your expectations?
   
   ```
         formatter: function(value, index) {
           switch (index) {
             case (data.length - 1):
               return '{first|} ' + value
               break
             case (data.length - 2):
               return '{second|} ' + value
               break
             case (data.length - 3):
               return '{third|} ' + value
               break
             default:
               return value
           }
         },
   ```
   
   ![image](https://user-images.githubusercontent.com/19756301/103684575-c01a4c80-4fc6-11eb-8f81-e637921f3cad.png)
   


----------------------------------------------------------------
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] CrotchBurnt commented on issue #13912: index in axisLabel’s formatter doesn't work as expected when "inverse=true"

Posted by GitBox <gi...@apache.org>.
CrotchBurnt commented on issue #13912:
URL: https://github.com/apache/incubator-echarts/issues/13912#issuecomment-752858506


   请见:https://codepen.io/crotchburnt/pen/OJRQzLx
   想达到的效果就是,无论是否inverse,总是给展示数据前三名加上样式


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