100pah commented on pull request #12947:
URL: 
https://github.com/apache/incubator-echarts/pull/12947#issuecomment-661650537


   
   @susiwen8  Do you mind upgrade about these below:
   
   When performing regression testing on the existing test cases 
(`test/*tooltip*`) and new test case (`test/new-tooltip.html`), I found some 
defects:
   
   ## Tooltip position issue
   
   The position is not appropriate in some case:
   
   `test/tooltip-appendToBody.html`
   
![image](https://user-images.githubusercontent.com/1956569/88013218-75a72f80-cb4e-11ea-831f-618fcca95bd6.png)
   The tooltip is far out of the current chart instance, too high. (That is not 
about the css 3d)
   
   `test/new-tooltip.html`
   
![image](https://user-images.githubusercontent.com/1956569/88014836-675b1280-cb52-11ea-99d2-68af04556a0a.png)
   
   
   ## Arrow position issue
   `test/new-tooltip.html`
   Use the first demo as an exmaple: 
   Set the `grid.bottom: 0`, and set `tooltip.confine: true`, which confine the 
tooltip not overflow the DOM of the current chart instance. The arrow becoming 
wrong.
   
![image](https://user-images.githubusercontent.com/1956569/88015226-4cd56900-cb53-11ea-9cd0-8f7bee47bb59.png)
   
   Aslo, set `grid.right: 10`, and set `tooltip.confine: true`, the arrow is 
also incorrect.
   
![image](https://user-images.githubusercontent.com/1956569/88015871-d0dc2080-cb54-11ea-8308-e0e134b0c36b.png)
   
   `tooltip.confine` is useful when there are some `overflow:hidden` setting on 
the any of the ancestors of the main DOM. So I think it should better to add 
this test case to `test/new-tooltip.html`.
   
   Is indeed an issue that the location of the tooltip body might makes the 
"center-vertical" arrow impossible to point to the target point. In this case, 
I think there probably these solutions:
   
   (A) do not show arrow. (recommended)
   Simple but not consistent (but I think that result can be accepted).
   
   (B) make a "oblique" arrow.
   Not easy to implement, especially consider the different customized style of 
the tooltip.
   I think not need to bring that complex.
   
![image](https://user-images.githubusercontent.com/1956569/88016633-61ffc700-cb56-11ea-8778-0261f20755a0.png)
   
   (C) make a "oblique line" instead of arrow.
   Easier than (B) but still not consistent.
   
![image](https://user-images.githubusercontent.com/1956569/88016650-6e841f80-cb56-11ea-9da6-df65b85b7937.png)
   
   
   What's your opinion @Wdingding @susiwen8 @pissang @Ovilia ?
   
   ## Do not show tooltip when return `null`/`undefined`
   
   Previously, then `tooltip.formatter` return `null`/`undefined`, tooltip will 
not be displayed any more.
   But currently, it is displayed as:
   
![image](https://user-images.githubusercontent.com/1956569/88017002-4943e100-cb57-11ea-9035-45fa6d806f88.png)
   I think we should better not do that break change.
   
   
   
   ## Content layout issue
   In these cases in `test/new-tooltip.html`:
   The text is not at the `vertical middle` of the tooltip, which is not good.
   
![image](https://user-images.githubusercontent.com/1956569/88017260-e4d55180-cb57-11ea-9975-767536e31279.png)
   
![image](https://user-images.githubusercontent.com/1956569/88017265-e7d04200-cb57-11ea-8a8e-03fc7a6b830b.png)
   
![image](https://user-images.githubusercontent.com/1956569/88017272-eacb3280-cb57-11ea-99c2-4f34b8e1943e.png)
   
   In this case below, the gap is too small. (The upper texts and the lower 
texts are from different series, should have a larger gap than the title and 
data in a single series)
   
![image](https://user-images.githubusercontent.com/1956569/88017400-2a921a00-cb58-11ea-9bcd-db596b2883b3.png)
   
   Because that is a "default style" of tooltip, it could be used in most of 
the product scenario. So it is checked carefully.
   ( @Wdingding  what's your opinion about that? )
   
   
   ## About the setting to show arrow
   In the current commit:
   > When trigger was item and position is top | bottom | left | right, Tooltip 
will show arrow and it points to current series
   
   But I doubt that in most cases, users will not set `tooltip.position` as  
top | bottom | left | right .
   Thus in most cases, arrow will not be displayed.
   @Wdingding @pissang is it OK for that?
   
   
   
   


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

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