HOUSHENGREN commented on issue #18488: URL: https://github.com/apache/echarts/issues/18488#issuecomment-1511109238
> > See the [demo](https://echarts.apache.org/examples/zh/editor.html?c=candlestick-sh&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJiAIwArAAMaZkZWbk5-dmFeUUFPLDFFQWVJTXFZQBM9QAsDckAHGXJAMypnU0A7A0AbOnWoR4U1HT-ENDK46T-jABGVP5ucR542sAA7kRgHEoLHgD0p7AgwHgQkDB0YKDBCbAOm7BLq_4AMozkwAowEQAGaWeh3OAAChAjA4jAAtngAJTxF6wegwPDAfxUAB0_mArGhsIRyPe6A4VDACg4cHcaPQGCIMLhiPxKzWACUqODcRgTglyMySWzPlyeWBceQBR54cAfFQAPIKjhLEB0bYQYFgAAazzRdgA3O87HFTehbEagA) and checkout the [doc](https://echarts.apache.org/zh/option.html#series-line.labelLayout). > > 我想获取网格的宽度,或者网格一个单元格的宽度。通过判断文字宽度是否超过网格单元格的宽度,进而决定要不要对label数据进行位置的调整。没发现如何获取。 > > 我写了个demo,80是写死的,我希望计算出网格单元格宽度来替换它。这样,代码更有通用性。 => [demo](https://echarts.apache.org/examples/zh/editor.html?c=candlestick-sh&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJiAIwArAAMaZkZWbk5-dmFeUUFPLDFFQWVJTXFZdUNVU21pbAATMkAHPUAzKn1ACwA7GVtAGzp1qEeFNR0_hDQytOk_owARlT-bnEeeNrAAO5EYBxKKx4A9JewIMB4EJAwdGCgwQmwDruwa5v-ADKMcjABRgIgAM0s9CecAAFCBGBxGABbPAASniH1g9BgeGA_ioADp_MBWPDESj0d90BBweSkajiRstgAlKjQwmHCACMDaWAAPlgnXSsAAZKLbhTGUIwIwAJLQARUDCwACk7QxHCoYAUHDg7ix6AwRARDLwTL-bI5GAuCXIJql5t-rPZYEJ5FgAGpJWaLS6OdoqBBWNowLAAFTtW0eZHAHxUADy8Y4axAdH2tLAAA13li7NTYNdYFqdXrMR8i0aHb7nf4rW6bQXK7B7T7KX66673dHCzd0LH40mIqn09pMzmmzc7ABub75jzz2C2GdAA) ![image](https://user-images.githubusercontent.com/48871516/232461286-cd6aa904-58fb-4636-958c-50f565398c1e.png) 大佬,有没有方法计算网格单元格宽度呢?🤦♂️ -- 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: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org