You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/08/09 04:16:23 UTC

[GitHub] [echarts] Ovilia commented on a diff in pull request #16206: fix: Axis.nameTextStyle.width is not valid

Ovilia commented on code in PR #16206:
URL: https://github.com/apache/echarts/pull/16206#discussion_r940878264


##########
src/component/axis/AxisBuilder.ts:
##########
@@ -435,7 +435,7 @@ const builders: Record<'axisLine' | 'axisTickLabel' | 'axisName', AxisElementsBu
                 text: name,
                 font: textFont,
                 overflow: 'truncate',
-                width: maxWidth,
+                width: maxWidth || +textStyleModel.get('width'),

Review Comment:
   Using `||` is not correct because `maxWidth` can be 0. You should update the logic at https://github.com/apache/echarts/pull/16206/files#diff-180b57aa9331c3128a2e4f577028b529d0318bf3eecc911499242546bf1012ceR425 in retrieve.



-- 
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-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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