DavidMarquezF commented on issue #13839:
URL: https://github.com/apache/echarts/issues/13839#issuecomment-1165465214

   I was able to imporve it: 
   
![image](https://user-images.githubusercontent.com/32216320/175522024-17b10dd5-f879-44ab-be50-13a146a479b6.png)
   
   I basically do the same as 
https://github.com/apache/echarts/issues/4902#issuecomment-747313873 but when I 
use a dummy separator to indicate the sections and then I put the caption in 
the bar in the middle. This means that for pair groups it will still be a bit 
off (but at least it won't be in the first columns) and that for even groups it 
will be placed perfectly in the middle. To give you an idea:
   
   ```
   xAxis: [
   ...,
   {
     axisLabel: {
             inside: true,
             interval: (index, value) => {
               return value !== "" && value !== dummySeparator;
             },
           },
           offset: 80,
           axisTick: {
             length: 70,
             lineStyle: {
               color: "#CCC"
             },
             inside: true,
             interval: (index, value) => {
               return value === dummySeparator;
             }
           },
           splitArea: {
             show: true,
             interval: (index, value) => {
               return value === dummySeparator;
             }
           },
           data: groupCategrories.flatMap(c => {
   
             const spaces = new Array(c.length).fill("");
             spaces[0] = dummySeparator;
             spaces[Math.max(0, Math.trunc((spaces.length-1) / 2))] = 
c.caption; 
             return spaces;  
           })
   }
   }
   ```


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to