mxxlrfu opened a new issue, #19498:
URL: https://github.com/apache/echarts/issues/19498

   ### What problem does this feature solve?
   
   I was working on a label position switch from `top` to `bottom` based on the 
highlighted point coordinates — _in order to avoid the label to overflow the 
chart area_. I tried different things, like tweaking the tooltip configuration 
since its `position` property provides many information ...But the coordinates 
are the mouse's and not the highlighted `point`.
   
   Unless I didn't find the right way to do this, I had to first combine the 
`seriesIndex` and `dataIndex` with the `getOption` method, fetch the `value` 
and use it along with `seriesIndex` with the `convertToPixel` method to finally 
get the coordinates. It's not obvious and it feels like something is missing.
   
   ### What does the proposed API look like?
   
   Currently, the information provided by the highlight event on line charts is 
the following, it's very tiny...
   
   ```json
   {
     "type": "highlight",
     "escapeConnect": true,
     "batch": [
       {
         "seriesIndex": 0,
         "dataIndexInside": 24,
         "dataIndex": 24,
         "type": "highlight",
         "escapeConnect": true,
         "notBlur": true,
         "batch": null
       }
     ]
   }
   ```
   
   Is it possible to add the `value` here so we can skip the `getOption` part? 
Or even better, having a dynamic positioning of labels in the chart config ? 
Something similar to the tooltip's ^^


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