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/11/24 13:10:32 UTC

[GitHub] [incubator-echarts] zhexueren opened a new issue #13688: ToolBox Can‘t’ Switch Magic Type

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


   ### Version
   4.2.0-rc.2
   
   ### Steps to reproduce
   #### Step1:The toolbox config is:
    ```
    toolbox:{
           show:true,
           orient:'vertical',
           feature: {
             dataView: {
               readOnly: false
             },
             magicType: {
               type: ["line", "bar"]
             },
             restore: {},
             saveAsImage: {}
           }
         }
   ```
   #### Step2:Click data view,than click refresh
   
   #### Step3:The line,bar,restore button cann't work
   
   ### What is expected?
   The line,bar,restore can work
   
   ### What is actually happening?
   The line,bar,restore button cann't work
   
   <!-- 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] zhexueren removed a comment on issue #13688: ToolBox Can‘t Switch Magic Type

Posted by GitBox <gi...@apache.org>.
zhexueren removed a comment on issue #13688:
URL: https://github.com/apache/incubator-echarts/issues/13688#issuecomment-733503942


   > @zhexueren Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://www.makeapie.com/editor.html.
   The demo url is:[https://codepen.io/zhexueren/pen/gOwYXWP]


----------------------------------------------------------------
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] plainheart commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   It looks like the type of data became `string` from the previous `number`. It caused your label formatter threw a type error.
   ```js
   params.data.toFixed is not a function
   ```
   As a workaround, you could convert `params.data` to a number through `(+params.data)` before calling `toFixed` function.
   
   **Changes**:
   ```diff
   - params.data.toFixed(2)+'%'
   + (+params.data).toFixed(2)+'%'
   ```
   
   Not sure if this is a bug that must be fixed. Does the dataview component need to guess the data type or follow the previous data type?
   In fact, it's not so complicated for the user to convert the data type to `number` before using.
   


----------------------------------------------------------------
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] zhexueren commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   > @zhexueren Please provide a demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM or https://www.makeapie.com/editor.html.
   The demo url is:[https://codepen.io/zhexueren/pen/gOwYXWP]


----------------------------------------------------------------
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] zhexueren commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   @Ovilia The demo url is https://codepen.io/zhexueren/pen/gOwYXWP


----------------------------------------------------------------
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] zhexueren commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   @Ovilia The demo url is  [https://codepen.io/zhexueren/pen/gOwYXWP](https://codepen.io/zhexueren/pen/gOwYXWP)
   


----------------------------------------------------------------
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 issue #13688: ToolBox Can‘t Switch Magic Type

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


   Sorry, I cannot reproduce. Can you be more specific about the steps?


----------------------------------------------------------------
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] plainheart commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   @Ovilia Any idea?


----------------------------------------------------------------
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 issue #13688: ToolBox Can‘t Switch Magic Type

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


   > @Ovilia Any idea?
   
   I think this should be fixed in the source code. 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.

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 #13688: ToolBox Can‘t Switch Magic Type

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


   @zhexueren 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] zhexueren commented on issue #13688: ToolBox Can‘t Switch Magic Type

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


   @plainheart  you are right. The toFixed() can't be used in string type.
   #### Changes:
   ```
   - params.data.toFixed(2)+'%'
   + parseFloat(params.data).toFixed(2)+'%'
   ```
   After modification, it can work!But I think echart needs an optimization on 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.

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