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 2021/08/01 01:09:52 UTC

[GitHub] [echarts] lucasgcb edited a comment on issue #15435: Line Stacks showing wrong values in axisPointer tooltip

lucasgcb edited a comment on issue #15435:
URL: https://github.com/apache/echarts/issues/15435#issuecomment-890426268


   > For example, if data were
   > 
   > ```js
   > ['tree', 30],
   > ['building', 40],
   > ['street', 2],
   > ```
   > 
   > and tooltip shows for stacked line
   > 
   > ```js
   > ['tree', 30],
   > ['building', 70],
   > ['street', 72],
   > ```
   > 
   > Then user might think the number of `street` is 72, but the true number is 2.
   > 
   > ECharts respect input data value. User can change it by `formatter`, but that is user intention, not ECharts'.
   
   In your example, 2 is indeed the true number for the _street_ series. However, when [line stack](https://echarts.apache.org/en/option.html#series-line.stack) is enabled, the _street_ series is never actually shown in the plot.
   
   If the data is inputted as a stack, it's not longer about _street_. It's _a new series_ on the plot, with tree+building+street. The true number for this is not 2. The true number is 30 + 40 + 2. Otherwise, it would not be a stack. The tooltip will completely ignore this and simply show "street" with the same color identity, even if it no longer is in the plot.
   
   On the very plot I attached:
   
   ![image](https://user-images.githubusercontent.com/7332704/127755658-46b8f5ac-1537-4874-9d4f-929c66b24afa.png)
   
   The yellow series in this plot is a stack. Its "true number" is not 234, because that's not what is shown in the plot; what is shown in the plot is a _new series with stacked values_ while retaining the color identity of the `意向` series. The plot does not reflect this whatsoever, and becomes disinformation.
   
   With the current way the tooltip is implemented, there's no way to tell when stack is enabled nor is there an easy way to fix the tooltip other than messing with the formatter, which can then lead to more issues. This discrepancy in more subtle line series, such as in confidence bands, can lead to terrible results.


-- 
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-unsubscribe@echarts.apache.org

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