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


##########
src/chart/custom/CustomSeries.ts:
##########
@@ -117,6 +117,8 @@ export interface CustomBaseElementOption extends 
Partial<Pick<
     textContent?: CustomTextOption | false;
     // `false` means remove the clipPath
     clipPath?: CustomBaseZRPathOption | false;
+    // `false` means not show tooltip
+    disableTooltip?: boolean;

Review Comment:
   There has been `emphasisDisabled` in custom series settings and numerous 
options `xxx.disabled`. Should this new option be 'tooltipDisabled' for naming 
style consistency?
   I mean the public option. ECElement `disableLabelLayout` `disableMorphing` 
are internal props.



##########
src/component/tooltip/TooltipView.ts:
##########
@@ -450,7 +450,7 @@ class TooltipView extends ComponentView {
         const el = e.target;
         const tooltipModel = this._tooltipModel;
 
-        if (!tooltipModel) {
+        if (!tooltipModel || el && el.disableTooltip) {

Review Comment:
   + If this new prop is set on a group, is it expected to work? The current 
impl add the new prop on `CustomBaseElementOption`, which is also the super 
class of group option. And intuitively, I think it should work for a group.
   
   + If we return here, could it causes the already displayed tooltip to fail 
to hide when entering this element? I haven't test it, but only checked the 
code below, when the tooltip should not be triggered, a hide logic will be 
executed.
   
   Thus I think the impl should not here but in the below part of this function.
   + If it is a `trigger: 'axis'` tooltip, display tooltip as usual or skip and 
go the hide logic (which one make more sense, the latter one need more logic, 
since there is no `el = e.target` in `trigger: 'axis'` tooltip)
   + If it is a `trigger: 'item'` tooltip, in the travel of 
`findEventDispatcher`, if any ancestor marked as "display tooltip", go the hide 
logic.
   



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