echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] display the data from overlapping polygons on the map in tooltip

Open gabrielnemeth opened this issue 3 years ago • 0 comments

What problem does this feature solve?

Sometimes it makes sense to display data from polygons that are covered by other polygons.

image

In the example above I wanted to display data in the tooltip for the covered polygon as well since the user is pointing to a place which is intersected by both of the polygons. The problem is I get only the hovered items data into the formatter tooltip callback.

Here is a link for a simple example: https://codepen.io/gabriel-n-meth/pen/PoemodO

What does the proposed API look like?

Example tooltip option:

tooltip: {
   trigger: 'item',
   passthrough: true
}

By setting the passThrough flag to true, we should get a data array of all of the polygons the user is pointing to.

gabrielnemeth avatar Sep 18 '22 09:09 gabrielnemeth