robertjorg opened a new issue #10708: Ability to add additional data to tooltip formatter URL: https://github.com/apache/incubator-echarts/issues/10708 ### What problem does this feature solve? You can put data in the tooltip formatter for the given data point. On the line graph you seem to only be able to use the name and value like this: ``` formatter: function (params) { return params.value '<br />' '(' params.name ')' }``` It would be nice to have the ability to use data that are not present in the param to display in the tool tip. An example is when the line graph shows the percentage of a numerator and denominator. The tool tip could show the percent, numerator, and denominator (the numerator and denominator come from another array of data) ### What does the proposed API look like? ``` tooltip: { formatter: function (params) { return params.value '<br />' '(' params.name ')' '<br />' 'Numerator: ' this.data.numerator '<br />' 'Denominator: ' this.data.numerator } }``` <!-- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
