jetibest commented on issue #19441:
URL: https://github.com/apache/echarts/issues/19441#issuecomment-5131422210

   > The workaround I ended up after struggling with grouped columns:
   > 
   > The idea is to use two extra axes:
   > 
   > * one axis for groups with an **odd** number of children
   > * another axis for groups with an **even** number of children. Setting 
`boundaryGap` to **false** for this axes aligns the group labels to the center 
between data rows.
   > 
   > Resizing such charts keeps the group labels in the correct positions.
   > 
   > [Full 
code.](https://echarts.apache.org/examples/en/editor.html?c=bar-y-category&code=pVVLb5tAEL7zK-ZSAWpKbJJciFypaqyoUtv0UKUH5MMaFkODWcQuia3I_72zwy6P1o378MHA8M3Mt988SEQlFWwa0dYSFvDsALi3-gnmbgQxPurfc8IU34hmH4H73twi4AweWdnyCOaz2eHsJWw4YMMeu9IXky08le1iiHBxKtvlgL08hb0asFcDM-dw7TidNqpIHrQ08Wx1bUwiTT-yNS_J3Fv5I6-OmEnbI3ZDpuDWfLf-zhMVPPC99LqC-EEmmiVLcg-NsHhL5em8C8W32rEDxvgeI8A4WVC3MveCICBosGW15_k6CGJ9X4MHBkew-k6j9TWwwvl-T6BkUn1FaZADKRTTf1DyaqNyeANz4tMZKXrv8Lojb6AdEwq5LdK05B-qlO8w6gj_iak8yEohGqLVZzmHkNyLDKYvXkEIi8UCZj5JBqPadGRGqSjCAfAVN-C-vL_BOge8OqJWhajMzOze7QoZGX-1r7GbXOoqVzcUddW-g8QTjBWWYAAMIfrMNhKAzMVTBKppeYcwDZoyxaJRAW2S83NQeSEpEPlKO9tPBepyd3MzdXqJTC1koY-Ib0qeKWMVWSa5opH_U84AXVn05FpL0koltvdaIhSF2mRyQB2VijCEzUSlvvFik2N2dy3K1DD6OVhfviOKjeajL8xp2Zb3y89T3f5FubVoq5Q1-1tWR5Ax7Le_VHTk8_8qDRMxiYhKfMGmB1Fx4DvVMOCVwjWpBJIoMrsO05Zrkz0SbFiNk0AEj6sd4IijSl7suiu_l56-AJJrUe36t-eo2FYrG87m-J0xNqP2mjW9qUtkVidN3Gh5lpjQ_3WbEUxvMssCt_0P&enc=deflate)
   > 
   > <img alt="Image" width="803" height="521" 
src="https://private-user-images.githubusercontent.com/1473072/550201769-1405cb5c-f5ba-440a-8c1e-f36c1a851cef.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU0MTcxNDUsIm5iZiI6MTc4NTQxNjg0NSwicGF0aCI6Ii8xNDczMDcyLzU1MDIwMTc2OS0xNDA1Y2I1Yy1mNWJhLTQ0MGEtOGMxZS1mMzZjMWE4NTFjZWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDczMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MzBUMTMwNzI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDkwY2RiNjE1YjIxMTg0YTA3YjBiMTgyOTAxMmY5OTA1YmU0ZDc5NjQ5NTU0NWNlN2IyYTg5ZWVmMDUyYTU2YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.vSRP7kj8RzY13qMJmCWkAtsF0n3-rCuM3SqB0KfgsPQ";>
   
   The code following the "full code" link doesn't work anymore.
   
   The ticks are not like the screenshot. What happens is that passing ticks 
customValues with [0,2,5] should intuitively indeed work properly in this 
particular example. However, ticks shown now, are at these indices: [0,2,3].
   
   There are two separate bugs. It appears that the tick at index 5 is not 
shown at all. Furthermore, you could manually set [0,2] and it will still show 
the tick at index 3, in fact, if you only pass [0] it will show ticks at [0,1]. 
So it looks like a tick is automatically added after the last custom tick. And 
so the last tick cannot be set with custom, it will be considered out of range, 
and is left out altogether. This makes this otherwise fine solution useless 
with regards to the ticks, still works for the labels though.
   
   Perhaps this workaround can be adjusted to use the graphic property for the 
lines, and stick to this approach concerning the labels.
   
   Having the native ability to configure a multi-level axis to echarts, would 
be a great new feature though.


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