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 2018/11/20 14:37:16 UTC

[GitHub] sxmpasch edited a comment on issue #9429: need to get axisLabel.maxLabel

sxmpasch edited a comment on issue #9429: need to get axisLabel.maxLabel
URL: https://github.com/apache/incubator-echarts/issues/9429#issuecomment-440294869
 
 
   @arashdalir - ok, percentage to absolute pixel. You just have to calculate this against the total height of the echarts instance:
   ```
                       let topPixel=myChart.getOption().grid[1].top
                       if (topPixel.indexOf('%')>=0) {
                           topPixel=topPixel.substr(0,topPixel.length-1);
                           topPixel=parseInt(topPixel)/100*myChart.getHeight();
                       }
                       console.log(topPixel)
                       let coord=myChart.convertFromPixel({seriesIndex:0},[0,topPixel]);
                       console.log(coord[1]);                    
   
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

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