You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/10/05 15:08:57 UTC

[GitHub] [incubator-echarts] l1b3r opened a new issue #13389: Add tolerance margin to the tooltip for scatter charts

l1b3r opened a new issue #13389:
URL: https://github.com/apache/incubator-echarts/issues/13389


   ### What problem does this feature solve?
   I'm using echarts to plot multiple line charts. Although they are rendered on one common X axis, each graph has its own set of X values, e.g.:
   ```
   Chart 1:                 Chart 2:
   [0.4; 12]                 [0.3; 5]
   [0.8; 10]                 [0.7; 8]
   [0.9; 11]                 [0.9; 6]
   [0.10; 10]                [0.11; 7]
   ...                            ...
   ```
   Currently, the tooltip snaps to the X value of **one of the graphs** and shows the Y value for this exact X value, which means only one entry will be displayed in the tooltip in most of the points.
   
   When each graph has several thousand points within a reasonably similar `[Xmin; Xmax]` range and the chart is zoomed out, it seems confusing to the user why only only one of the graphs is shown at each point of time. Please see the following screenshots for a better understanding of the issue:
   
   ![image](https://user-images.githubusercontent.com/6207227/95096250-b3baf500-0734-11eb-97ae-7fee39ca91a7.png)
   ![image](https://user-images.githubusercontent.com/6207227/95096495-01cff880-0735-11eb-8627-f4fedf39dd67.png)
   
   
   I would like to propose introducing some kind of tolerance value to the tooltip, so that when it's set, the tooltip will get the Y values for nearest X within this tolerance. Here's an example of the desired feature in a different charting library. Please notice how the green circle is not perfectly aligned with the red vertical line. This is because the actual point is a little bit to the left, but it's still included in the tooltip.
   
   ![image](https://user-images.githubusercontent.com/6207227/95096905-86bb1200-0735-11eb-96da-ee8eeb9971bc.png)
   
   
   ### What does the proposed API look like?
   Something like a `tooltipTolerance` setting either for the xAxis/yAxis or the tooltip itself.
   
   I suppose this tolerance should be initially expressed as a % of the chart area and then automatically converted to the absolute value with dataZoom in mind.
   
   E.g. for X axis:
   `tooltipTolerance` is set to 1% and the chart is currently zoomed to the following range by the X axis: `[10, 25]`.
   This means that the tooltip should have a tolerance of `± |(25 - 10) * 0.01| = ±0.15`. So when it's positioned at point `x1` for graph1 and there's no point for graph2 with exact same `x == x1`, then the tooltip should try to find a nearest point in graph2 which has an X value within `[x1 - 0.15; x1 + 0.15]`
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13389: Add tolerance margin to the tooltip for scatter charts

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13389:
URL: https://github.com/apache/incubator-echarts/issues/13389#issuecomment-703694878


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org