100pah commented on issue #9026: Axis Label overlapping
URL: 
https://github.com/apache/incubator-echarts/issues/9026#issuecomment-419522818
 
 
   
[splitNumber](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.splitNumber)
 is mainly used to determine the number of displayed label and ticks.
   
   Probably this approach can be tried: 
   when changing the size of a chart, 
   ```js
   function onChartContainerDomChange() {
       var height = chart.getHeight();
       var splitNumber = height < 200
           ? 2
           : height < 300
           ? 4
           : null;
       console.log(height, splitNumber);
       chart.setOption({
           yAxis: {splitNumber: splitNumber}
       });
       chart.resize();
   }
   ```
   
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to