yay opened a new issue, #18523: URL: https://github.com/apache/echarts/issues/18523
### What problem does this feature solve? Hi, We'd like to migrate from [visx](https://airbnb.io/visx/) to eCharts ,but need to support the following emphasis style in our charts: https://imgur.com/a/r5Ty6af https://imgur.com/a/Owvnb8g It doesn't seem like it's possible to achieve something like that with the latest version of eCharts. Happy to be wrong on that :) Would you consider adding an API that either allows defining a shape to draw around a data point when it's hovered or one that allows to paint a custom shape (via a provided drawing context or by returning the shape in SVG path syntax, for example)? ### What does the proposed API look like? ``` emphasis: { formatter: (point: RenderedDataPoint, ctx: CanvasLikeRenderingContext2D) { const { x, y, width, height, radius, rawValue } = RenderedDataPoint; return 'SVG path syntax string'; }, style: { fill: 'none', stroke: 'white', lineWidth: 1 } } ``` Where the `RenderedDataPoint` is the data point in screen coordinates, represented by either center/radius or a bounding box rectangle: ``` type RenderedDataPoint = { x: number; // x,y is the center of the data point in case of line/area series, the top-left corner in case of bar/boxplot series y: number; width?: number; // for bar/boxplot series height?: number; // for bar/boxplot series radius?: number; // for line/area series markers, for example rawValue: any; // a reference to the raw data that is represented } ``` And where `ctx` is a context similar to `CanvasRenderingContext2D`, but not necessarily a native one. Under the hood you can call the native context commands or turn them into SVG, depending on the rendering backend used. Alternatively, one can return a string in SVG path syntax from `formatter` function, instead of calling `ctx.lineTo`, `ctx.bezierCurveTo` and the like. -- 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-unsubscr...@echarts.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org