You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "hughess (via GitHub)" <gi...@apache.org> on 2023/05/14 11:44:47 UTC

[GitHub] [echarts] hughess commented on issue #18622: [Bug] Need y-axis information in params for tooltip formatter

hughess commented on issue #18622:
URL: https://github.com/apache/echarts/issues/18622#issuecomment-1546880350

   Sorry, my example doesn’t do a great job of showing the problem. The reason I can’t use the series to determine the format is I’m building a library on top of echarts, so I need to create a generalized formatter function that can be used in any situation. For the axis labels, I have access to the series information before generating the chart, so I can supply the formatting that the user sets for each column. 
   
   Unfortunately, for tooltips I can’t access that same information because it’s triggered from the client.
   
   I might be able to use the series name to look up what the correct format is, but there is one other issue with that: we show our series names as formatted versions of column names (e.g., sales_usd —-> Sales ($) ). Ideally, I would look up the format using the series column name (sales_usd), but the only information I have access to in params is the formatted name. I haven’t been able to figure out how to set a separate series name and ID in a way that will be accessible in the tooltip formatter.
   
   For reference, here is the feature I am looking to implement where this is an issue: 
   https://github.com/evidence-dev/evidence/issues/412


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