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 2021/04/07 12:14:03 UTC

[GitHub] [echarts] throrin19 commented on issue #13397: Zoom with drag

throrin19 commented on issue #13397:
URL: https://github.com/apache/echarts/issues/13397#issuecomment-814864873


   I made a hack to do this. If someone is interrested, I made this like that :  
   
   1. In Options, I initiate toolbox and I set buttons with empty path to not show them : 
       ```js
       toolbox : {
           orient   : 'vertical',
           itemSize : 13,
           top      : 15,
           right    : -6,
           feature  : {
               dataZoom : {
                   yAxisIndex  : 'none',
                   icon        : {
                       zoom : 'path://', // hack to remove zoom button
                       back : 'path://', // hack to remove restore button
                   },
               },
           },
       },
       ```
   1. When chart is available, I dispatch action to activate toolbox zoom : 
       ```js
       chartInst.dispatchAction({
           type                    : 'takeGlobalCursor',
           key                     : 'dataZoomSelect',
           dataZoomSelectActive    : true,
       });
       ```


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