100pah commented on code in PR #16315:
URL: https://github.com/apache/echarts/pull/16315#discussion_r1844989067


##########
src/component/axis/AxisBuilder.ts:
##########
@@ -810,6 +810,15 @@ function buildAxisLabel(
         });
         textEl.anid = 'label_' + tickValue;
 
+        graphic.setTooltipConfig({
+            el: textEl,
+            componentModel: axisModel,
+            itemName: formattedLabel,
+            formatterParamsExtra: {

Review Comment:
   Yes. And if there are multiple lines in this label, the current approach 
would not work.
   I've just add an PR in zrender to support output the state of "trucated" 
https://github.com/ecomfe/zrender/pull/1101 . Is it an appropriate way?



##########
src/component/axis/AxisBuilder.ts:
##########
@@ -836,6 +837,15 @@ function buildAxisLabel(
         });
         textEl.anid = 'label_' + tickValue;
 
+        graphic.setTooltipConfig({
+            el: textEl,
+            componentModel: axisModel,
+            itemName: formattedLabel,
+            formatterParamsExtra: {
+                isEllipsised: () => formattedLabel !== 
(textEl.childrenRef()[0] as TSpan).style.text,

Review Comment:
   ellipsis seem to be a noun rather than verb. ellipsize looks like a verb 
(`isEllipsized`), like 
https://developer.android.com/reference/android/widget/TextView#attr_android:ellipsize
 , although this word doesn't appear in traditional dictionary.
   Or I think `isTruncated` is better, since the echarts option is `overflow: 
'truncate'`.



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