AntidotUser opened a new issue, #19826:
URL: https://github.com/apache/echarts/issues/19826

   ### What problem does this feature solve?
   
   In line charts, one can have different symbol markers on his different 
lines, which is great for accessibility. Unfortunately, I have found no way to 
retrieve the symbol used in a line in order to put it in the tooltip of the 
chart. That would allow to have tooltips stating such things as: 
   
   - "RedDiamond" sales: 300$
   - "BlueSquare" purchases: 250$
   
   when hovering the mouse over the chart.
   
   I've tried:
   
       formatter: function(paramsRaw) {
         let text = '';
         paramsRaw.forEach(param => {
           text += `${param.marker}<br>`;
         })
         return text;
       }
       
   But 'marker' always gives me the round bullet (fortunately, with the right 
colour), which defeats the accessibility I aim at when using symbols.
   
   N.B.: I use only one symbol on each line, even when there is more than one 
value on the line.
   
   Cf.: [symbols example where the legend uses the right symbols but not the 
tooltip](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQDKYAhgMYDWOAJrADITQ6VEC-AGiJhgwLJBAFUxDACcIAc0U45VOqQgBnSsNkAzYHIC2dMGFUF9AV2gNIMABQg6cusa0AlOgHcAlISy6C5uHt4-AHSGcgCijAAWzq7uCAB8gUHocjhg1nJwRLL8foWw_AJ6sLgq0KzSpaxmdAQA2pQxphBYurCUAKrQUHAAgqw6gr0AahCsOMCwo-O9ACIQ2fY9NDiuDPGwMdCK3LwAuhVEigp1Gei4-hS9AMwApLqlCorxD5QALK-V6AARsBzMBjFQXm9ZAwYPRuBw6ICcFgCGA5NYcOd0KJxMDSPUDNtctkCUEtHQAG44YZaACSphU0nKRSxsFIw00WlJ2IAniB8L0GGYcIojDyocRgbZGnIeQBxOhSWD6OhYLQ4AGwRr0VqUACyME2ABUMZsAOpsY3xaybABiCk21DMjtslDO6CERB5HO03IwfIFlApqtNrPVChwXNgLVKMiC0HcgY6dC6EtkYADVCwxzTxC0POMwJRvVccmAPlz6HzhfE1AgAC8BQBGAAMmqr9GYVCNINVla1TVaTYATG3YE3HsOJq2m9PHj8JgBOMfDx4r1sndtVY60Hm4P2yaBGUzFuOZXn81oAdmnP03pUyjS08QA8vp9OqHleH8RmUFPZkOISBASpnkEP5VgWRbqHIZYVj-f4epqYHoAmxiBgMQwLGM_YZpevTZjw_bVtBvRltKng4BsW4kbWDbNm2P5aJ2TDdr23RbtqzTRsOo7TgAHFO46LrOsCrguYnLhMjxrtJG5boROC7vuNzxseqoHkE
 
eECi0I4Cfe57EE-r7vp-BAAGwQWUCGlABxAobAaGBtMszzIsuGZgROY0VB4hUAwawMLgxG-VgdaNgQrY0SxbH0BxP5cUOACsK6ThMo6iU2SUSU2UmwDJY4_PJP6KcpAoOah6mnlZF46eZ07DgZhkDs-b4fjkFlWYhv62chP5OVQqzrGAHn4ZQikhTWxaUMNk1FuFDHRYwrG9D2cX9ol0aTmOMlCWuokyRJjx5QV0mjk1silRmKkVY5VWaemnm6WOWUXeexltWZsBJV1NlFH1mQDb01DbHIuz7Ic3k_tpWZQ5ktHTawEDuDArBzXREXjox8Mxat7EbYO0aCWOi5pbAy6iaTOXDnlE6yeO21vbcO7XeVVlHiYGmqYBT1JdOLZM0EH2mR132_Zk3V_mc_AANxAA)
   
   ### What does the proposed API look like?
   
   Maybe to have a 'symbol' property in the params of the tooltip formatter 
function would be enough, like so:
   
       formatter: function(paramsRaw) {
         let text = '';
         paramsRaw.forEach(param => {
           text += `${param.symbol}<br>`;
         })
         return text;
       }
      
   This way, if you want to access the round marker you can (for example when a 
single line has several symbols) and when you want to access a line which has 
several markers using symbols, you can access them, too.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to